texinfo-commits
[Top][All Lists]
Advanced

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

[6338] simple test for texindex


From: karl
Subject: [6338] simple test for texindex
Date: Tue, 16 Jun 2015 22:57:49 +0000

Revision: 6338
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6338
Author:   karl
Date:     2015-06-16 22:57:48 +0000 (Tue, 16 Jun 2015)
Log Message:
-----------
simple test for texindex

Modified Paths:
--------------
    trunk/texindex/Makefile.am

Added Paths:
-----------
    trunk/texindex/tests/ti-helpversion.sh

Property Changed:
----------------
    trunk/texindex/tests/

Modified: trunk/texindex/Makefile.am
===================================================================
--- trunk/texindex/Makefile.am  2015-06-15 13:11:54 UTC (rev 6337)
+++ trunk/texindex/Makefile.am  2015-06-16 22:57:48 UTC (rev 6338)
@@ -76,3 +76,7 @@
 
 # a fun cartoon used in the literate program.
 EXTRA_DIST += dek_idx.png
+
+TESTS = \
+        tests/ti-helpversion.sh
+EXTRA_DIST += $(TESTS)


Property changes on: trunk/texindex/tests
___________________________________________________________________
Added: svn:ignore
   + *.trs


Added: trunk/texindex/tests/ti-helpversion.sh
===================================================================
--- trunk/texindex/tests/ti-helpversion.sh                              (rev 0)
+++ trunk/texindex/tests/ti-helpversion.sh      2015-06-16 22:57:48 UTC (rev 
6338)
@@ -0,0 +1,43 @@
+#!/bin/sh
+# $Id$
+# This file is public domain.
+
+# check texindex --help and --version.  We'll just ensure that stdout is
+# nonempty and exit status is zero, and not worry if the output is sensible.
+
+# if we ever have more tests, we should move this to a common file,
+# and ideally share with install-info/tests/defs.in, etc.
+####
+set -x
+# Make sure we override the user shell.
+SHELL='/bin/sh'; export SHELL
+
+# unsetting an already-unset variable fails with BSD sh.
+CDPATH=; unset CDPATH
+
+# If srcdir is not set, then we are not running from `make check'; be verbose.
+if test -z "$srcdir"; then
+   VERBOSE=x
+   # compute $srcdir.
+   srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
+   test $srcdir = $0 && srcdir=.
+fi
+
+texindex=./texindex
+TEXINDEX_SCRIPT=$srcdir/texindex.awk; export TEXINDEX_SCRIPT
+####
+
+# The actual test follows.
+out=`$texindex --version`
+if test $? -ne 0 || test -z "$out"; then
+  echo "$0: $texindex --version failed." >&2
+  exit 1
+fi
+
+out=`$texindex --help`
+if test $? -ne 0 || test -z "$out"; then
+  echo "$0: $texindex --help failed." >&2
+  exit 1
+fi
+
+exit 0


Property changes on: trunk/texindex/tests/ti-helpversion.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:keywords
   + Date Author Id
Added: svn:eol-style
   + LF




reply via email to

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