cleanup inlines
[buildroot.git] / package / gnuconfig / testsuite / config-sub.sh
blobab5d7ff667888e23e3f27c2a9f2080eebbe66452
1 #!/bin/sh
3 # Copyright 2004, 2005 Free Software Foundation, Inc.
4 # Contributed by Ben Elliston <bje@gnu.org>.
6 # This test reads pairs from config-sub.data: an alias and its
7 # canonical triplet. The config.sub scripts is invoked and the test
8 # checks that the alias expands to the expected canonical triplet.
10 verbose=false
12 run_config_sub ()
14 rc=0
15 while read alias canonical ; do
16 output=`sh ../config.sub $alias`
17 if test $output != $canonical ; then
18 echo "FAIL: $alias -> $output, but expected $canonical"
19 rc=1
20 else
21 $verbose && echo "PASS: $alias"
23 done < config-sub.data
24 return $rc
27 run_config_sub
28 rc=$?
29 if test $rc -eq 0 ; then
30 $verbose || echo "PASS: config.sub checks"
31 else
32 test $rc -eq 1 && echo "Unexpected failures."
35 exit $rc