autoconf-patches
[Top][All Lists]
Advanced

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

testsuite buglet


From: Eric Blake
Subject: testsuite buglet
Date: Sat, 08 Apr 2006 22:22:14 +0000

I think this patch:
http://lists.gnu.org/archive/html/autoconf-patches/2006-03/msg00067.html

was inadvertantly applied wrong (it put the test for $() on the `` tests, then
calls out the $() tests in the changelog).

2006-04-08  Eric Blake  <address@hidden>

        * tests/autotest.at (Backquote command substitution),
        (Multiline backquote command substitution): Remove mistaken
        AT_NO_CMDSUBST, which was meant to be applied...
        (Parenthetical command substitution, Multiline parenthetical
        command substitution): here.
Index: tests/autotest.at
===================================================================
RCS file: /sources/autoconf/autoconf/tests/autotest.at,v
retrieving revision 1.11
diff -u -p -r1.11 autotest.at
--- tests/autotest.at   5 Apr 2006 16:04:22 -0000       1.11
+++ tests/autotest.at   8 Apr 2006 22:13:21 -0000
@@ -110,8 +110,7 @@ two
 
 AT_CHECK_AT_TEST([Backquote command substition],
   [AT_CHECK([echo `echo hi`], 0, [hi
-], [])],
-  [AT_NO_CMDSUBST])
+], [])])
 
 
 AT_CHECK_AT_TEST([Multiline backquote command substition],
@@ -120,12 +119,12 @@ bar
 ])
    AT_CHECK([echo "`cat myfile`"], 0, [foo
 bar
-], [])],
-  [AT_NO_CMDSUBST])
+], [])])
 
 AT_CHECK_AT_TEST([Parenthetical command substition],
   [AT_CHECK([echo $(echo hi)], 0, [hi
-], [])])
+], [])],
+  [AT_NO_CMDSUBST])
 
 AT_CHECK_AT_TEST([Multiline parenthetical command substition],
   [AT_DATA([myfile],[foo
@@ -133,7 +132,8 @@ bar
 ])
    AT_CHECK([echo "$(cat myfile)"], 0, [foo
 bar
-], [])])
+], [])],
+  [AT_NO_CMDSUBST])
 
 
 ## ------------------------- ##
@@ -251,6 +253,51 @@ AT_CHECK_AT_TITLE_CHAR([Double-quote], [
 AT_CHECK_AT_TITLE_CHAR([Backslash],    [\])
 
 
+## ----------------- ##
+## Debugging a test. ##
+## ----------------- ##
+
+AT_CHECK_AT_TEST([Debugging a successful test],
+  [AT_CHECK([:])], [], [], [], [ignore],
+[# Without options, when all tests pass, no test directory should exist.
+AT_CHECK([test -d micro-suite.dir/1 && exit 42
+          ./micro-suite -d 1], [], [ignore], [ignore])
+# Running with -d should leave a reproducible test group.
+# Also, running the test script from the test group locks the
+# directory from removal on some platforms; the script should still be
+# able to run even if rmdir fails.
+AT_CHECK([(cd micro-suite.dir/1 && ./run)], [], [ignore], [ignore])
+# Running a debugging script implies -d.
+AT_CHECK([(cd micro-suite.dir/1 && ./run)], [], [ignore], [ignore])
+])
+
+AT_CHECK_AT_TEST([Debugging script and environment],
+  [AT_CHECK([test "$MY_VAR" = pass || exit 42])],
+  [], [1], [], [ignore], [
+# Changing environment outside of debugging script is not preserved.
+AT_CHECK([(cd micro-suite.dir/1 && MY_VAR=pass ./run)],
+         [0], [ignore], [ignore])
+AT_CHECK([(cd micro-suite.dir/1 && ./run)],
+         [1], [ignore], [ignore])
+# Changing environment as argument to debugging script is preserved.
+AT_CHECK([(cd micro-suite.dir/1; ./run MY_VAR=pass)],
+         [0], [ignore], [ignore])
+AT_CHECK([(cd micro-suite.dir/1; ./run)],
+         [0], [ignore], [ignore])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]