pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/regress/tools/files Oops. I had put the awk-specific f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/57da285d6754
branches:  trunk
changeset: 503665:57da285d6754
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 24 19:20:18 2005 +0000

description:
Oops. I had put the awk-specific functions into test.subr. Moved back.

diffstat:

 regress/tools/files/awk-test.sh |  27 ++++++++++++++++++++++++++-
 regress/tools/files/tests.subr  |  19 +------------------
 2 files changed, 27 insertions(+), 19 deletions(-)

diffs (72 lines):

diff -r a8106ee8646d -r 57da285d6754 regress/tools/files/awk-test.sh
--- a/regress/tools/files/awk-test.sh   Thu Nov 24 19:18:45 2005 +0000
+++ b/regress/tools/files/awk-test.sh   Thu Nov 24 19:20:18 2005 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: awk-test.sh,v 1.6 2005/11/24 19:18:45 rillig Exp $
+# $NetBSD: awk-test.sh,v 1.7 2005/11/24 19:20:18 rillig Exp $
 #
 
 set -e
@@ -8,6 +8,31 @@
 . "${mydir}/tests.subr"
 
 #
+# Functions specific for the awk testsuite.
+#
+
+# usage: test_assignment <testname> <input> <expected-output>
+test_assignment() {
+       testcase_start "$1"
+       o=`echo "" | awk '{print var}' var="$2"`
+       assert_equal "$1" "$3" "${o}"
+}
+
+# usage: test_passline <testname> <input>
+test_passline() {
+       testcase_start "$1"
+       o=`awk '{print}' <<EOF
+$2
+EOF
+`
+       assert_equal "$1" "$2" "${o}"
+}
+
+#
+# The actual test.
+#
+
+#
 # Assignment of variables from the command line. The Solaris
 # /usr/bin/awk does not conform to the POSIX specification, but passes
 # the right hand side of the assignment uninterpreted. It fails the
diff -r a8106ee8646d -r 57da285d6754 regress/tools/files/tests.subr
--- a/regress/tools/files/tests.subr    Thu Nov 24 19:18:45 2005 +0000
+++ b/regress/tools/files/tests.subr    Thu Nov 24 19:20:18 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tests.subr,v 1.1 2005/11/24 19:18:45 rillig Exp $
+# $NetBSD: tests.subr,v 1.2 2005/11/24 19:20:18 rillig Exp $
 #
 
 # usage: testcase_start <testname>
@@ -14,20 +14,3 @@
                return 1;;
        esac
 }
-
-# usage: test_assignment <testname> <input> <expected-output>
-test_assignment() {
-       testcase_start "$1"
-       o=`echo "" | awk '{print var}' var="$2"`
-       assert_equal "$1" "$3" "${o}"
-}
-
-# usage: test_passline <testname> <input>
-test_passline() {
-       testcase_start "$1"
-       o=`awk '{print}' <<EOF
-$2
-EOF
-`
-       assert_equal "$1" "$2" "${o}"
-}



Home | Main Index | Thread Index | Old Index