Home | History | Annotate | Download | only in tests
      1 #!/bin/bash
      2 
      3 [ -f testing.sh ] && . testing.sh
      4 
      5 #testing "name" "command" "result" "infile" "stdin"
      6 
      7 testing "not enough args [fail]" "uuencode 2>/dev/null" "" "" ""
      8 
      9 testing "uu empty file" "uuencode test" \
     10 	"begin 744 test\nend\n" "" "" 
     11 testing "uu 1-char" "uuencode test" \
     12 	"begin 744 test\n!80\`\`\nend\n" "" "a" 
     13 testing "uu 2-char" "uuencode test" \
     14 	"begin 744 test\n\"86(\`\nend\n" "" "ab" 
     15 testing "uu 3-char" "uuencode test" \
     16 	"begin 744 test\n#86)C\nend\n" "" "abc" 
     17 
     18 testing "b64 empty file" "uuencode -m test" \
     19 	"begin-base64 744 test\n====\n" "" "" 
     20 testing "b64 1-char" "uuencode -m test" \
     21 	"begin-base64 744 test\nYQ==\n====\n" "" "a" 
     22 testing "b64 2-char" "uuencode -m test" \
     23 	"begin-base64 744 test\nYWI=\n====\n" "" "ab" 
     24 testing "b64 3-char" "uuencode -m test" \
     25 	"begin-base64 744 test\nYWJj\n====\n" "" "abc" 
     26 
     27