From: Niels Möller Date: Wed, 1 Jan 2003 18:14:07 +0000 (+0100) Subject: New tests for hex and base64 literal X-Git-Tag: nettle_1.7_release_20030311~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=432de1323d26873b000dd5cc245b463dd0809ac3;p=thirdparty%2Fnettle.git New tests for hex and base64 literal output. Rev: src/nettle/testsuite/sexp-conv-test:1.4 --- diff --git a/testsuite/sexp-conv-test b/testsuite/sexp-conv-test index 625e8784..94202845 100755 --- a/testsuite/sexp-conv-test +++ b/testsuite/sexp-conv-test @@ -31,6 +31,22 @@ test_advanced () { fi } +test_advanced_hex () { + echo $n "$1$c" > test.in + if ../tools/sexp-conv -s hex test1.out ; then + true + else + exit 1 + fi + echo "$2" > test2.out + + if cmp test1.out test2.out ; then + true + else + exit 1; + fi +} + test_transport () { echo $n "$1$c" > test.in if ../tools/sexp-conv -s transport test1.out ; then @@ -80,6 +96,11 @@ test_advanced '; comment test_advanced '(foo[bar]foo)' '(foo [bar]foo)' +test_advanced '(#aabb#)' '(|qrs=|)' +test_advanced '(|qrs=|)' '(|qrs=|)' +test_advanced_hex '(|qrs=|)' '(#aabb#)' +test_advanced_hex '(#aabb#)' '(#aabb#)' + test_transport '0:' '{MDo=}' test_transport '()' '{KCk=}' test_transport 'foo' '{Mzpmb28=}'