diff options
author | rillig <rillig@pkgsrc.org> | 2005-11-24 19:46:45 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-11-24 19:46:45 +0000 |
commit | 477fc93c59242ec8bab916a4b30863f170c262ad (patch) | |
tree | e51608c834329838e97baae899a7236c7ace6bc4 | |
parent | d6e5c93e157c64c9209910379b071883a641be5f (diff) | |
download | pkgsrc-477fc93c59242ec8bab916a4b30863f170c262ad.tar.gz |
Added more tests for tr(1), including one that feeds 65536 bytes through
tr(1). Let's see if there's an implementation with bounded line lengths.
-rw-r--r-- | regress/tools/files/tr-test.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/regress/tools/files/tr-test.sh b/regress/tools/files/tr-test.sh index 071b8fbb5a3..32366311a55 100644 --- a/regress/tools/files/tr-test.sh +++ b/regress/tools/files/tr-test.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: tr-test.sh,v 1.1 2005/11/24 19:39:23 rillig Exp $ +# $NetBSD: tr-test.sh,v 1.2 2005/11/24 19:46:45 rillig Exp $ # set -e @@ -26,6 +26,7 @@ EOF # # The actual test. # + nl=" " @@ -35,3 +36,21 @@ tr_test "tolower" \ "The Great Green Fox" "the great green fox" "A-Z" "a-z" tr_test "eat-newlines" \ "foo${nl}bar${nl}" "foobar" -d "\\n" +tr_test "eat-minus" \ + "describe-function" "describefunction" -d "-" +# The following test does not work on NetBSD 1.6.2. +#tr_test "eat-minus-d" \ +# "describe-function" "escribefunction" -d "-d" +tr_test "eat-d-minus" \ + "describe-function" "escribefunction" -d "d-" + +s="0123456789abcdef" +s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s" +s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s" +s="$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s$s" +f="ffffffffffffffff" +f="$f$f$f$f$f$f$f$f$f$f$f$f$f$f$f$f" +f="$f$f$f$f$f$f$f$f$f$f$f$f$f$f$f$f" + +tr_test "65536" \ + "$s" "$f" -d "0-9a-e" |