summaryrefslogtreecommitdiff
path: root/Build/source/utils/axodraw2/axodraw2-src/axohelp-big.test
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-21 00:02:19 +0000
committerKarl Berry <karl@freefriends.org>2018-02-21 00:02:19 +0000
commit5c8d267d751a63bdaf761c0e039205cf714b2946 (patch)
tree8b681e89b58257cb1defbd464bb26fe48c15ec36 /Build/source/utils/axodraw2/axodraw2-src/axohelp-big.test
parente5a3c2aef0a4222f70682361f07ef47ec7e9d0ad (diff)
axohelp 1.1 / axodraw2 2.1.0b
git-svn-id: svn://tug.org/texlive/trunk@46692 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/axodraw2/axodraw2-src/axohelp-big.test')
-rwxr-xr-xBuild/source/utils/axodraw2/axodraw2-src/axohelp-big.test45
1 files changed, 45 insertions, 0 deletions
diff --git a/Build/source/utils/axodraw2/axodraw2-src/axohelp-big.test b/Build/source/utils/axodraw2/axodraw2-src/axohelp-big.test
new file mode 100755
index 00000000000..e0995335d37
--- /dev/null
+++ b/Build/source/utils/axodraw2/axodraw2-src/axohelp-big.test
@@ -0,0 +1,45 @@
+#!/bin/sh -vx
+
+# Copyright (C) 2018 John Collins (jcc8 at psu dot edu)
+# You may freely use, modify and/or distribute this file.
+
+# Notes about interpretation of tests:
+# The test file was generated in the compilation of axodraw2's manual,
+# and this test script therefore verifies much functionality of
+# axohelp. However, if the test fails, it may not actually indicate
+# an error. There are two possibilities for spurious failure:
+# a. There is a mismatch of line endings (\n v. \r\n, etc) between the
+# generated test file test-big.ax2 and the reference file
+# test-big.ax2-std. Correct the problem by adjusting
+# test-big.ax2-std accordingly.
+# b. Some of the numbers in the output file are generated by complex
+# floating point computations. Rounding errors can generate small
+# differences between the generated file and the reference file.
+# This results, for example, from a 32-bit executable compared with
+# a 64-bit executable, or from a compilation with different
+# compilers and the associated libraries (e.g., VisualStudio
+# compared with gcc).
+# Interpret the results of the test accordingly.
+
+if test -z "$test_srcdir"; then
+ # If not set, then we are not running from `make check'.
+ test_srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'` # == dirname $0
+ test "$test_srcdir" = "$0" && test_srcdir=. # in case subst failed
+fi
+
+test "$test_srcdir" = . \
+ || cp "$test_srcdir"/test-big.ax1 "$test_srcdir"/test-big.ax2-std . \
+ || exit 1
+
+echo Running axohelp on test document ...
+./axohelp test-big \
+ || { echo axohelp failed to run correctly ; exit 1; }
+
+echo Checking result file test.ax2, after converting line-endings ...
+tr -d '\r' < test-big.ax2 > tmp.ax2
+tr -d '\r' < test-big.ax2-std > tmp.ax2-std
+diff tmp.ax2-std tmp.ax2 \
+ || { echo The .ax2 file created by axohelp was incorrect; exit 1; }
+
+echo Success, so I will remove generated file test.ax2
+rm test-big.ax2 tmp.ax2 tmp.ax2-std