mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 03:50:57 +01:00
added unittest for yaml export
This commit is contained in:
@@ -333,8 +333,6 @@ void pcpexport_yaml(char *outfile) {
|
||||
fprintf(out, " secret: "); pcpprint_bin(out, s->secret, 32); fprintf(out, "\n");
|
||||
}
|
||||
fprintf(out, " edpub: "); pcpprint_bin(out, s->edpub, 32); fprintf(out, "\n");
|
||||
|
||||
fprintf(out, "\n");
|
||||
}
|
||||
|
||||
fprintf(out, "public-keys:\n");
|
||||
@@ -349,7 +347,6 @@ void pcpexport_yaml(char *outfile) {
|
||||
fprintf(out, " type: public\n");
|
||||
fprintf(out, " public: "); pcpprint_bin(out, p->public, 32); fprintf(out, "\n");
|
||||
fprintf(out, " edpub: "); pcpprint_bin(out, p->edpub, 32); fprintf(out, "\n");
|
||||
fprintf(out, "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,6 +204,12 @@ dxmorg@florida.cops.gov
|
||||
expect = /verified/
|
||||
</test>
|
||||
|
||||
#
|
||||
# yaml export test
|
||||
<test check-export-yaml>
|
||||
cmd = $pcp -V va -y | perl -MYAML -MData::Dumper -e "print Dumper(Load(join('',<>)))"
|
||||
expect = /VAR1/
|
||||
</test>
|
||||
|
||||
#
|
||||
# negative tests, check for error handling
|
||||
|
||||
Reference in New Issue
Block a user