bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: dfa tests: follow common file naming conventions
Date: Fri, 03 Jul 2020 18:54:41 +0200	[thread overview]
Message-ID: <2286922.F0gb5rNVDJ@omega> (raw)

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



                 reply	other threads:[~2020-07-03 17:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2286922.F0gb5rNVDJ@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).