summaryrefslogtreecommitdiff
path: root/tests/test-pread.sh
Commit message (Collapse)AuthorAgeFilesLines
* init.sh: avoid Solaris 10 /bin/sh portability problemJim Meyering2009-12-081-2/+1
| | | | | | | | | | | | | | | | | 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.
* init.sh: accommodate even those who specify bogus srcdir manuallyJim Meyering2009-11-261-1/+1
| | | | | | | | | | | * tests/init.sh: Normally, srcdir is guaranteed by automake and configure-time tests to be sanitized, so that there is no need to use "$srcdir" in Makefile rules and shell scripts. Using $srcdir (with no double quotes) suffices. However, since tests may be invoked manually, and since you may explicitly set srcdir to the name of a directory containing spaces, do quote its uses here. * tests/test-pread.sh: Likewise. Suggested by Bruno Haible.
* test-pread.sh: avoid diagnostics for those who ignore SIGPIPEJim Meyering2009-11-261-2/+2
| | | | | | | | * tests/test-pread.sh: Write no data into the pipe, because test-pread actually reads none. This avoids a diagnostic, "bash: echo: write error: Broken pipe", that arises in the unusual event something is ignoring SIGPIPE, and might be interpreted as some sort of failure. Reported by Bruno Haible.
* test-pread: cover failure with ESPIPE and EINVALJim Meyering2009-11-251-1/+1
| | | | | | * tests/test-pread.c (main): Test for failure, too. * tests/test-pread.sh: Invoke with stdin on a pipe. Suggested by Eric Blake.
* test-pread.sh: clean upJim Meyering2009-11-251-2/+2
| | | | | | | * tests/test-pread.sh: Don't refer to $builddir. Just use equivalent ".". * modules/pread-tests (TESTS_ENVIRONMENT): Don't export builddir. That is unnecessary, since it's always ".". Suggestion from Eric Blake.
* test-pread.sh: make executableJim Meyering2009-11-251-0/+0
| | | | | * tests/test-pread.sh: Set executable bit. Reported by Eric Blake.
* correct typo in test-pread.shJim Meyering2009-11-251-0/+1
| | | | * tests/test-pread.sh: Add #! line.
* test preadJim Meyering2009-11-251-0/+7
* tests/test-pread.c: New file. * tests/test-pread.sh: Likewise. * modules/pread-tests: Likewise.