From 3f939f9efa92a43f9faaca85b11574503eb67c00 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sat, 24 Oct 2020 16:45:06 +0100 Subject: [PATCH] add some argument permutation tests --- test.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test.sh b/test.sh index bfad33b..6b7c97c 100755 --- a/test.sh +++ b/test.sh @@ -42,6 +42,26 @@ dotest() { echo "running test $testno ($1)" } +dotest "argpermutation std" +echo foo1337bar > $(tmp).1 +echo 1337 | $JF -exec echo 'foo{}bar' > $(tmp).2 +test_equal $(tmp).1 $(tmp).2 + +dotest "argpermutation std 2x" +echo foo1337bar1337 > $(tmp).1 +echo 1337 | $JF -exec echo 'foo{}bar{}' > $(tmp).2 +test_equal $(tmp).1 $(tmp).2 + +dotest "argpermutation dot" +echo foobar.png > $(tmp).1 +echo foobar.bmp | $JF -exec echo '{.}.png' > $(tmp).2 +test_equal $(tmp).1 $(tmp).2 + +dotest "argpermutation dot 2x" +echo 'mv foobar.pcx foobar.png' > $(tmp).1 +echo foobar.bmp | $JF -exec echo 'mv {.}.pcx {.}.png' > $(tmp).2 +test_equal $(tmp).1 $(tmp).2 + dotest "seq 10 catmode skip 5" seq 10 > $(tmp).1 $JF -skip=5 < $(tmp).1 > $(tmp).2 -- 2.11.4.GIT