annotate tests/test-mbsrtowcs2.sh @ 12404:44954971957b
init.sh: avoid Solaris 10 /bin/sh portability problem
Solaris 10's /bin/sh does not pass '.' arguments 2..N to the
sourced script:
$ printf 'echo "$@"\n' > f; /bin/sh -c '. ./f bar'
$ printf 'echo "$@"\n' > f; bash -c '. ./f bar'
bar
tests/init.sh relied on that, accepting a --set-path=DIR argument,
and two tests used that idiom.
* tests/init.sh: Update suggested usage comments.
(path_prepend_): New function, to be used in place of
the --src-path=DIR option.
Disallow empty strings and strings containing ":".
(setup_): Move PATH-prepending code into path_prepend_.
* tests/test-pread.sh: Adapt to new usage.
* tests/test-xalloc-die.sh: Likewise.
author |
Jim Meyering <meyering@redhat.com> |
date |
Tue, 08 Dec 2009 20:37:50 +0100 |
parents |
4200847287e8 |
children |
|
rev |
line source |
10914
|
1 #!/bin/sh |
|
2 |
|
3 # Test whether a specific UTF-8 locale is installed. |
|
4 : ${LOCALE_FR_UTF8=fr_FR.UTF-8} |
|
5 if test $LOCALE_FR_UTF8 = none; then |
|
6 if test -f /usr/bin/localedef; then |
|
7 echo "Skipping test: no french Unicode locale is installed" |
|
8 else |
|
9 echo "Skipping test: no french Unicode locale is supported" |
|
10 fi |
|
11 exit 77 |
|
12 fi |
|
13 |
|
14 LC_ALL=$LOCALE_FR_UTF8 \ |
|
15 ./test-mbsrtowcs${EXEEXT} 2 |