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