Again, not trying to flood Rob with a storm of patches, but this isn't a very nuanced patch that could spark technical discussion imo (I already have strings -s[SEP] and -w(count \r and \n) implemented but I'm waiting to submit those)
Attached. - Oliver Webb <aquahobby...@proton.me>
From 2103c9a9883f0cb5febc423781a741a8f29986d4 Mon Sep 17 00:00:00 2001 From: Oliver Webb <aquahobby...@proton.me> Date: Thu, 25 Apr 2024 21:28:10 -0500 Subject: [PATCH] strings: testing -> testcmd --- tests/strings.test | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/strings.test b/tests/strings.test index 1a9a8826..c4eadcf7 100755 --- a/tests/strings.test +++ b/tests/strings.test @@ -4,22 +4,22 @@ #testing "name" "command" "result" "infile" "stdin" -testing "stdin" "strings" "foobar\n" "" "foobar\n" -testing "file" "strings input" "foobar\n" "foobar\n" "" -testing "string to the end" "strings input" "foobar\n" "foobar" "" -testing "short strings" "strings input" "" "foo\nbar\n" "" -testing "-n6" "strings -n6 input" "foobar\n" "foobar\nbaz\n" "" -testing "string and nulls" "strings input" "foobar\nbazfoo\n" \ +testcmd "stdin" "" "foobar\n" "" "foobar\n" +testcmd "file" "input" "foobar\n" "foobar\n" "" +testcmd "string to the end" "input" "foobar\n" "foobar" "" +testcmd "short strings" "input" "" "foo\nbar\n" "" +testcmd "-n6" "-n6 input" "foobar\n" "foobar\nbaz\n" "" +testcmd "string and nulls" "input" "foobar\nbazfoo\n" \ "\0foobar\0\0bazfoo\0foo" "" -testing "-f" "strings -f input" "input: foobar\n" "foobar\n" "" -testing "-o" "strings -o input | sed 's/^ *//'" "6 foobar\n" \ +testcmd "-f" "-f input" "input: foobar\n" "foobar\n" "" +testcmd "-o" "-o input | sed 's/^ *//'" "6 foobar\n" \ "\0\0\0\0\0\0foobar\n" "" -testing "-o, multiple strings" "strings -n3 -o input | sed 's/^ *//'" \ +testcmd "-o, multiple strings" "-n3 -o input | sed 's/^ *//'" \ "1 foo\n7 bar\n" "\0foo\0b\0bar\n" "" -testing "-fo" "strings -fo input | sed 's/: */: /'" "input: 6 foobar\n" \ +testcmd "-fo" "-fo input | sed 's/: */: /'" "input: 6 foobar\n" \ "\0\0\0\0\0\0foobar\n" "" OFFSET_10="\0\0\0\0\0\0\0\0\0\0foobar\n" -testing "-t o" "strings -t o | sed 's/^ *//'" "12 foobar\n" "" $OFFSET_10 -testing "-t d" "strings -t d | sed 's/^ *//'" "10 foobar\n" "" $OFFSET_10 -testing "-t x" "strings -t x | sed 's/^ *//'" "a foobar\n" "" $OFFSET_10 +testcmd "-t o" "-t o | sed 's/^ *//'" "12 foobar\n" "" $OFFSET_10 +testcmd "-t d" "-t d | sed 's/^ *//'" "10 foobar\n" "" $OFFSET_10 +testcmd "-t x" "-t x | sed 's/^ *//'" "a foobar\n" "" $OFFSET_10 -- 2.44.0
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net