For many years now, we have this (unwritten) convention regarding names of files in tests/: - Files that start with "test-" are test files for a specific module. - Other files are shared (or can be shared) among multiple modules.
Only the 'dfa' tests don't follow this convention. 2020-07-03 Bruno Haible <[email protected]> dfa tests: Follow common file naming conventions. * tests/test-dfa-match-aux.c: Renamed from tests/dfa-match-aux.c. * tests/test-dfa-match.sh: Renamed from tests/dfa-match.sh. Update. * tests/test-dfa-invalid-char-class.sh: Renamed from tests/dfa-invalid-char-class.sh. Update. * modules/dfa-tests (Files, Makefile.am): Update. diff --git a/modules/dfa-tests b/modules/dfa-tests index 5855652..4c447c2 100644 --- a/modules/dfa-tests +++ b/modules/dfa-tests @@ -1,7 +1,7 @@ Files: -tests/dfa-match.sh -tests/dfa-match-aux.c -tests/dfa-invalid-char-class.sh +tests/test-dfa-match.sh +tests/test-dfa-match-aux.c +tests/test-dfa-invalid-char-class.sh Depends-on: getprogname @@ -13,9 +13,9 @@ regex configure.ac: Makefile.am: -TESTS += \ - dfa-invalid-char-class.sh \ - dfa-match.sh +TESTS += \ + test-dfa-invalid-char-class.sh \ + test-dfa-match.sh -check_PROGRAMS += dfa-match-aux -dfa_match_aux_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIBINTL@ $(LIB_MBRTOWC) +check_PROGRAMS += test-dfa-match-aux +test_dfa_match_aux_LDADD = $(LDADD) $(LIB_SETLOCALE) @LIBINTL@ $(LIB_MBRTOWC) diff --git a/tests/dfa-invalid-char-class.sh b/tests/test-dfa-invalid-char-class.sh similarity index 88% rename from tests/dfa-invalid-char-class.sh rename to tests/test-dfa-invalid-char-class.sh index 8e8824d..094bab0 100755 --- a/tests/dfa-invalid-char-class.sh +++ b/tests/test-dfa-invalid-char-class.sh @@ -18,13 +18,13 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src -# Add "." to PATH for the use of dfa-match-aux. +# Add "." to PATH for the use of test-dfa-match-aux. path_prepend_ . fail=0 echo 'dfaerror: invalid character class' > exp -LC_ALL=C ${CHECKER} dfa-match-aux '[[:foo:]]' a > out 2>&1 +LC_ALL=C ${CHECKER} test-dfa-match-aux '[[:foo:]]' a > out 2>&1 compare exp out || fail=1 Exit $fail diff --git a/tests/dfa-match-aux.c b/tests/test-dfa-match-aux.c similarity index 100% rename from tests/dfa-match-aux.c rename to tests/test-dfa-match-aux.c diff --git a/tests/dfa-match.sh b/tests/test-dfa-match.sh similarity index 86% rename from tests/dfa-match.sh rename to tests/test-dfa-match.sh index bc9e1dc..a7285ec 100755 --- a/tests/dfa-match.sh +++ b/tests/test-dfa-match.sh @@ -18,7 +18,7 @@ . "${srcdir=.}/init.sh"; path_prepend_ ../src -# Add "." to PATH for the use of dfa-match-aux. +# Add "." to PATH for the use of test-dfa-match-aux. path_prepend_ . if (type timeout) >/dev/null 2>&1; then @@ -33,11 +33,11 @@ fi fail=0 -${CHECKER} dfa-match-aux a ba 0 > out || fail=1 +${CHECKER} test-dfa-match-aux a ba 0 > out || fail=1 compare /dev/null out || fail=1 in=$(printf "bb\nbb") -$timeout_10 ${CHECKER} dfa-match-aux a "$in" 1 > out || fail=1 +$timeout_10 ${CHECKER} test-dfa-match-aux a "$in" 1 > out || fail=1 compare /dev/null out || fail=1 Exit $fail
