]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Test that autotest handles binary output.
authorEric Blake <ebb9@byu.net>
Wed, 15 Apr 2009 12:38:58 +0000 (06:38 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 15 Apr 2009 12:38:58 +0000 (06:38 -0600)
* tests/autotest.at (Binary output): New test.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
tests/autotest.at

index b33ba8df06546e2ceec498b905e44450aa429658..b7dd8f64101cba06363e6b0bd6f35aeb866e9615 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-04-15  Eric Blake  <ebb9@byu.net>
 
+       Test that autotest handles binary output.
+       * tests/autotest.at (Binary output): New test.
+       Suggested by Ralf Wildenhues.
+
        Add stdout-nolog and ignore-nolog to AT_CHECK.
        * lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog))
        (AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog))
index ed898cdce3c8a94836fa5a15ef90c19b52e01311..721925c2127f1735326f211eb95e9b0418bada23 100644 (file)
@@ -332,6 +332,48 @@ magicstring06
 ]])])
 
 
+AT_CHECK_AT([Binary output],
+  [[AT_INIT([artificial test suite])
+    AT_SETUP([pass: no trailing newline])
+    AT_CHECK([printf short], [0], [stdout-nolog])
+    AT_CHECK([cat stdout], [0], [[short]])
+    AT_CLEANUP
+    AT_SETUP([pass: non-printing characters])
+    AT_CHECK([printf '\1\n' >&2], [0], [], [stderr-nolog])
+    printf '\1\n' > expout
+    AT_CHECK([cat stderr], [0], [expout])
+    AT_CLEANUP
+    AT_SETUP([pass: long lines])
+    # 5000 bytes in str
+    str=..........
+    str=$str$str$str$str$str$str$str$str$str$str
+    str=$str$str$str$str$str$str$str$str$str$str
+    str=$str$str$str$str$str
+    AT_CHECK_NOESCAPE([echo $str], [0], [[$str]m4_newline])
+    AT_CLEANUP
+    AT_SETUP([fail: no trailing newline])
+    AT_CHECK([printf short], [0], [stdout-nolog])
+    AT_CHECK([cat stdout], [0], [[long]])
+    AT_CLEANUP
+    AT_SETUP([fail: non-printing characters])
+    AT_CHECK([printf '\1\n' >&2], [0], [], [stderr-nolog])
+    printf '\2\n' > expout
+    AT_CHECK([cat stderr], [0], [expout])
+    AT_CLEANUP
+    AT_SETUP([fail: long lines])
+    # 5000 bytes in str
+    str=..........
+    str=$str$str$str$str$str$str$str$str$str$str
+    str=$str$str$str$str$str$str$str$str$str$str
+    str=$str$str$str$str$str
+    AT_CHECK_NOESCAPE([echo x$str], [0], [[${str}x]m4_newline])
+    AT_CLEANUP
+]], [], [0], [], [], [],
+  [AT_CHECK([$CONFIG_SHELL ./micro-suite 4], [1], [ignore], [ignore])
+   AT_CHECK([$CONFIG_SHELL ./micro-suite 5], [1], [ignore], [ignore])
+   AT_CHECK([$CONFIG_SHELL ./micro-suite 6], [1], [ignore], [ignore])], [1-3])
+
+
 AT_CHECK_AT_TEST([Cleanup],
   [AT_CHECK([test ! -f cleanup.success && test ! -f cleanup.failure])
    AT_CHECK_NOESCAPE([exit $value], [ignore], [$output],