annotate scripts/test/uuencode.test @ 890:c7e7b159568d

The host sort on many distros behaves stupidly, and sorts stuff in non-ascii order by default. Make it stop.
author Rob Landley <rob@landley.net>
date Mon, 29 Apr 2013 16:00:40 -0500
parents 3107c5525cc7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
828
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 [ -f testing.sh ] && . testing.sh
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 #testing "name" "command" "result" "infile" "stdin"
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
6
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 testing "uuencode not enough args [fail]" "uuencode 2>/dev/null" "" "" ""
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 testing "uuencode uu empty file" "uuencode test" \
837
3107c5525cc7 Change uuencode test to match what other uuencode implementations actually produce.
Rob Landley <rob@landley.net>
parents: 828
diff changeset
10 "begin 744 test\nend\n" "" ""
828
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 testing "uuencode uu 1-char" "uuencode test" \
837
3107c5525cc7 Change uuencode test to match what other uuencode implementations actually produce.
Rob Landley <rob@landley.net>
parents: 828
diff changeset
12 "begin 744 test\n!80\`\`\nend\n" "" "a"
828
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 testing "uuencode uu 2-char" "uuencode test" \
837
3107c5525cc7 Change uuencode test to match what other uuencode implementations actually produce.
Rob Landley <rob@landley.net>
parents: 828
diff changeset
14 "begin 744 test\n\"86(\`\nend\n" "" "ab"
828
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 testing "uuencode uu 3-char" "uuencode test" \
837
3107c5525cc7 Change uuencode test to match what other uuencode implementations actually produce.
Rob Landley <rob@landley.net>
parents: 828
diff changeset
16 "begin 744 test\n#86)C\nend\n" "" "abc"
828
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
17
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 testing "uuencode b64 empty file" "uuencode -m test" \
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 "begin-base64 744 test\n====\n" "" ""
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 testing "uuencode b64 1-char" "uuencode -m test" \
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 "begin-base64 744 test\nYQ==\n====\n" "" "a"
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 testing "uuencode b64 2-char" "uuencode -m test" \
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 "begin-base64 744 test\nYWI=\n====\n" "" "ab"
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 testing "uuencode b64 3-char" "uuencode -m test" \
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 "begin-base64 744 test\nYWJj\n====\n" "" "abc"
1fdaba9a7124 uuencode/decode tests and tweaks from Erich Plondke.
Rob Landley <rob@landley.net>
parents:
diff changeset
26