aboutsummaryrefslogtreecommitdiff
path: root/tests/base64.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-04-04 18:13:51 -0500
committerRob Landley <rob@landley.net>2017-04-04 18:13:51 -0500
commit216e4dab193458ba396db861a5eb6d410f80d1c8 (patch)
tree54f96586d3c58824eeee4d49df6e0343b26c3c5c /tests/base64.test
parenta456c2fc6b219d29294aa54c41fdad141b1d4254 (diff)
downloadtoybox-216e4dab193458ba396db861a5eb6d410f80d1c8.tar.gz
Add "testcmd" function as an alternative to "testing" for tests/*.test, and
check in two converted commands.
Diffstat (limited to 'tests/base64.test')
-rwxr-xr-xtests/base64.test16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/base64.test b/tests/base64.test
index 2058198b..7e5a99a3 100755
--- a/tests/base64.test
+++ b/tests/base64.test
@@ -4,21 +4,21 @@
#testing "name" "command" "result" "infile" "stdin"
-testing "simple" "base64" "c2ltcGxlCg==\n" "" "simple\n"
-testing "file" "base64 input" "c2ltcGxlCg==\n" "simple\n" ""
-testing "simple -d" "base64 -d" "simple\n" "" "c2ltcGxlCg==\n"
-testing "simple -d" "base64 -d input" "simple\n" "c2ltcGxlCg==" ""
-testing "default wrap" "base64" \
+testcmd "simple" "" "c2ltcGxlCg==\n" "" "simple\n"
+testcmd "file" "input" "c2ltcGxlCg==\n" "simple\n" ""
+testcmd "simple -d" "-d" "simple\n" "" "c2ltcGxlCg==\n"
+testcmd "simple -d" "-d input" "simple\n" "c2ltcGxlCg==" ""
+testcmd "default wrap" "" \
"V2UndmUgcmVwbGFjZWQgdGhlIGRpbGl0aGl1bSB0aGV5IG5vcm1hbGx5IHVzZSB3aXRoIEZvbGdl\ncidzIENyeXN0YWxzLg==\n" \
"" "We've replaced the dilithium they normally use with Folger's Crystals."
-testing "multiline -d " "base64 -d" \
+testcmd "multiline -d " "-d" \
"We've replaced the dilithium they normally use with Folger's Crystals." "" \
"V2UndmUgcmVwbGFjZWQgdGhlIGRpbGl0aGl1bSB0aGV5IG5vcm1hbGx5IHVzZSB3aXRoIEZvbGdl\ncidzIENyeXN0YWxzLg==\n"
-testing "-w" "base64 -w 10" \
+testcmd "-w" "-w 10" \
"TWFyY2hpbm\ncgdG8gdGhl\nIGJlYXQgb2\nYgYSBkaWZm\nZXJlbnQga2\nV0dGxlIG9m\nIGZpc2guCg\n==\n" \
"" "Marching to the beat of a different kettle of fish.\n"
-testing "-w0" "base64 -w0 input" \
+testcmd "-w0" "-w0 input" \
"VmlraW5ncz8gVGhlcmUgYWluJ3Qgbm8gdmlraW5ncyBoZXJlLiBKdXN0IHVzIGhvbmVzdCBmYXJtZXJzLiBUaGUgdG93biB3YXMgYnVybmluZywgdGhlIHZpbGxhZ2VycyB3ZXJlIGRlYWQuIFRoZXkgZGlkbid0IG5lZWQgdGhvc2Ugc2hlZXAgYW55d2F5LiBUaGF0J3Mgb3VyIHN0b3J5IGFuZCB3ZSdyZSBzdGlja2luZyB0byBpdC4K" \
"Vikings? There ain't no vikings here. Just us honest farmers. The town was burning, the villagers were dead. They didn't need those sheep anyway. That's our story and we're sticking to it.\n" ""