pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/regress/tools/files Added more tests for tr(1), includ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f4427e76bba2
branches:  trunk
changeset: 503669:f4427e76bba2
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 24 19:46:45 2005 +0000

description:
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.

diffstat:

 regress/tools/files/tr-test.sh |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r a8a812ae04fa -r f4427e76bba2 regress/tools/files/tr-test.sh
--- a/regress/tools/files/tr-test.sh    Thu Nov 24 19:39:23 2005 +0000
+++ b/regress/tools/files/tr-test.sh    Thu Nov 24 19:46:45 2005 +0000
@@ -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 @@
 #
 # The actual test.
 #
+
 nl="
 "
 
@@ -35,3 +36,21 @@
        "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"



Home | Main Index | Thread Index | Old Index