summaryrefslogtreecommitdiff
path: root/package/gnuconfig/testsuite/config-sub.sh
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-08-04 22:42:34 +0000
committerMike Frysinger <vapier@gentoo.org>2005-08-04 22:42:34 +0000
commit105c3483b5e01184eceb2eb9ddd59dfd4dc5054f (patch)
tree91703f9d8b526cbcf7e7611ad843177552c4b8d4 /package/gnuconfig/testsuite/config-sub.sh
parent1a48268a55175b4efa751c1a22fb4d977ea8b326 (diff)
add support for fetching latest config.{sub,guess} files from config cvs
Diffstat (limited to 'package/gnuconfig/testsuite/config-sub.sh')
-rw-r--r--package/gnuconfig/testsuite/config-sub.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/package/gnuconfig/testsuite/config-sub.sh b/package/gnuconfig/testsuite/config-sub.sh
new file mode 100644
index 000000000..03b642010
--- /dev/null
+++ b/package/gnuconfig/testsuite/config-sub.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Copyright 2004, 2005 Free Software Foundation, Inc.
+# Contributed by Ben Elliston <bje@gnu.org>.
+#
+# This test reads pairs from config-sub.data: an alias and its
+# canonical triplet. The config.sub scripts is invoked and the test
+# checks that the alias expands to the expected canonical triplet.
+
+verbose=false
+
+function run_config_sub ()
+{
+ rc=0
+ while read alias canonical ; do
+ output=`sh ../config.sub $alias`
+ if test $output != $canonical ; then
+ echo "FAIL: $alias -> $output, but expected $canonical"
+ rc=1
+ else
+ $verbose && echo "PASS: $alias"
+ fi
+ done < config-sub.data
+ return $rc
+}
+
+run_config_sub
+rc=$?
+if test $rc -eq 0 ; then
+ $verbose || echo "PASS: config.sub checks"
+else
+ test $rc -eq 1 && echo "Unexpected failures."
+fi
+
+exit $rc