> string-desc: Add tests. > * tests/test-string-desc.sh: New file. > * tests/test-string-desc.c: New file. > * modules/string-desc-tests: New file.
Oops, these tests cause a "make distcheck" failure: ERROR: files left in build directory after distclean: ./gettext-tools/gnulib-tests/test-string-desc.ok make[1]: *** [Makefile:699: distcleancheck] Error 1 Fixed as follows. 2023-03-30 Bruno Haible <br...@clisp.org> string-desc tests: Fix "make distcheck" failure. * tests/test-string-desc.sh: Run the test in a subdir. diff --git a/tests/test-string-desc.sh b/tests/test-string-desc.sh index 1f52ccf19e..57f0e2371b 100755 --- a/tests/test-string-desc.sh +++ b/tests/test-string-desc.sh @@ -1,13 +1,12 @@ #!/bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . -./test-string-desc${EXEEXT} > test-string-desc-1.tmp 3> test-string-desc-3.tmp || exit 1 +${CHECKER} test-string-desc${EXEEXT} > test-string-desc-1.tmp 3> test-string-desc-3.tmp || Exit 1 printf 'Hello world!The\0quick\0brown\0\0fox\0' > test-string-desc.ok : "${DIFF=diff}" -${DIFF} test-string-desc.ok test-string-desc-1.tmp || { echo "string_desc_fwrite KO" 1>&2; exit 1; } -${DIFF} test-string-desc.ok test-string-desc-3.tmp || { echo "string_desc_write KO" 1>&2; exit 1; } +${DIFF} test-string-desc.ok test-string-desc-1.tmp || { echo "string_desc_fwrite KO" 1>&2; Exit 1; } +${DIFF} test-string-desc.ok test-string-desc-3.tmp || { echo "string_desc_write KO" 1>&2; Exit 1; } -rm -f test-string-desc-1.tmp test-string-desc-3.tmp - -exit 0 +Exit 0