diff options
Diffstat (limited to '')
-rw-r--r-- | checks/ChangeLog | 5 | ||||
-rwxr-xr-x | checks/clearsig.test | 2 | ||||
-rwxr-xr-x | checks/defs.inc | 22 | ||||
-rwxr-xr-x | checks/mds.test | 2 |
4 files changed, 29 insertions, 2 deletions
diff --git a/checks/ChangeLog b/checks/ChangeLog index b5c20f7da..d5520589e 100644 --- a/checks/ChangeLog +++ b/checks/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 4 10:34:18 CEST 1999 Werner Koch <[email protected]> + + + * defs.inc (echo_n): New and used instead of /bin/echo "\c" + Sun Apr 18 10:11:28 CEST 1999 Werner Koch <[email protected]> * mkdemodirs: New diff --git a/checks/clearsig.test b/checks/clearsig.test index 99dca45f8..f77fd5db0 100755 --- a/checks/clearsig.test +++ b/checks/clearsig.test @@ -73,7 +73,7 @@ $srcdir/run-gpg --verify x # bash's builtin echo needs the option -e so we use the external one. # ====================================== echo "this is a sig test" >y -/bin/echo " \c" >>y +echo_n " " >>y echo "$usrpass1" | $srcdir/run-gpg --passphrase-fd 0 --clearsign -o x --yes y $srcdir/run-gpg --verify x diff --git a/checks/defs.inc b/checks/defs.inc index 5c4a82b75..058a23370 100755 --- a/checks/defs.inc +++ b/checks/defs.inc @@ -51,6 +51,28 @@ chdir () { cd $1 || fatal "cannot cd to $1" } +echo_n_init=no +echo_n () { + if test "$echo_n_init" = "no"; then + if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + echo_n_n= + echo_n_c=' +' + else + echo_n_n='-n' + echo_n_c= + fi + else + echo_n_n= + echo_n_c='\c' + fi + echo_n_init=yes + fi + echo $echo_n_n "${1}$echo_n_c" +} + + #cleanup () { # rm $cleanup_files 2>/dev/null || true # echo "#empty" >./options diff --git a/checks/mds.test b/checks/mds.test index 98584b395..6b9cfbd15 100755 --- a/checks/mds.test +++ b/checks/mds.test @@ -25,7 +25,7 @@ fi [ "$failed" != "" ] && error "$failed failed for empty string" -/bin/echo "abcdefghijklmnopqrstuvwxyz\c" | $srcdir/run-gpg --print-mds >y +echo_n "abcdefghijklmnopqrstuvwxyz" | $srcdir/run-gpg --print-mds >y test_one "MD5" "C3FCD3D76192E4007DFB496CCA67E13B" test_one "SHA1" "32D10C7B8CF96570CA04CE37F2A19D84240D3A89" test_one "RMD160" "F71C27109C692C1B56BBDCEB5B9D2865B3708DBC" |