bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* dfa tests: follow common file naming conventions
@ 2020-07-03 16:54 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2020-07-03 16:54 UTC (permalink / raw)
  To: bug-gnulib

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  <bruno@clisp.org>

	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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-03 17:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 16:54 dfa tests: follow common file naming conventions Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).