aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Kuzmich <ilya.kuzmich@gmail.com>2017-05-29 17:57:09 +0300
committerRob Landley <rob@landley.net>2017-07-07 16:27:56 -0500
commit1ae3703a9faa7165ebc46dbf80895971ca64a004 (patch)
tree1cb410550a931723f496421ac4395ae44f2defe1
parenta0e2e7d3057a5b7344c13e2349d683a0ca3d3899 (diff)
downloadtoybox-1ae3703a9faa7165ebc46dbf80895971ca64a004.tar.gz
strings -t oxd tests
-rw-r--r--tests/strings.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/strings.test b/tests/strings.test
index 8becc2f5..935d3bca 100644
--- a/tests/strings.test
+++ b/tests/strings.test
@@ -18,3 +18,8 @@ testing "-o, multiple strings" "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" \
"\0\0\0\0\0\0foobar\n" ""
+
+OFFSET_10="\0\0\0\0\0\0\0\0\0\0foobar"
+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