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