diff options
author | Bruno Haible <bruno@clisp.org> | 2008-04-26 14:14:12 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2008-04-26 14:14:12 +0200 |
commit | 3911e72f350db41219cae293f0ef90eb3d9361eb (patch) | |
tree | f2d13fb6e94d737802600c044e3541606992aac2 /tests/test-xstrtoimax.sh | |
parent | bb037ad8926e663ad33a8a384f6d5c4f26af0fd4 (diff) | |
download | gnulib-3911e72f350db41219cae293f0ef90eb3d9361eb.tar.gz |
Work around limitation of an old 'tr' program on Solaris.
Diffstat (limited to 'tests/test-xstrtoimax.sh')
-rwxr-xr-x | tests/test-xstrtoimax.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test-xstrtoimax.sh b/tests/test-xstrtoimax.sh index 14cb9e07ed..e6a5e5dd5e 100755 --- a/tests/test-xstrtoimax.sh +++ b/tests/test-xstrtoimax.sh @@ -19,8 +19,16 @@ result=0 ./test-xstrtoimax${EXEEXT} 010 >> t-xstrtoimax.tmp 2>&1 || result=1 ./test-xstrtoimax${EXEEXT} MiB >> t-xstrtoimax.tmp 2>&1 || result=1 +# Find out how to remove carriage returns from output. Solaris /usr/ucb/tr +# does not understand '\r'. +if echo solaris | tr -d '\r' | grep solais > /dev/null; then + cr='\015' +else + cr='\r' +fi + # normalize output -LC_ALL=C tr -d '\r' < t-xstrtoimax.tmp > t-xstrtoimax.xo +LC_ALL=C tr -d "$cr" < t-xstrtoimax.tmp > t-xstrtoimax.xo mv t-xstrtoimax.xo t-xstrtoimax.tmp # compare expected output |