summaryrefslogtreecommitdiff
path: root/tests/test-filevercmp.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-06-03 17:27:44 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2022-06-03 17:30:39 -0700
commit1ba2b66ea45f9bc43cdc0f6f93efa59157d2b2ba (patch)
tree9a040418bd7f1291fc0202a516421313991bc5a5 /tests/test-filevercmp.c
parentff24917703530849f3b109905d437337cdeeab14 (diff)
downloadgnulib-1ba2b66ea45f9bc43cdc0f6f93efa59157d2b2ba.tar.gz
filevercmp: don’t treat entire filename as suffix
Problem reported by Artém S. Tashkinóv in: https://lists.gnu.org/r/bug-gnulib/2022-06/msg00012.html * lib/filevercmp.c (file_prefixlen): When stripping (\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes, do not strip the entire file name. * tests/test-filevercmp.c (examples): Adjust to match new behavior.
Diffstat (limited to 'tests/test-filevercmp.c')
-rw-r--r--tests/test-filevercmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-filevercmp.c b/tests/test-filevercmp.c
index b2a7e90f3f..998250990d 100644
--- a/tests/test-filevercmp.c
+++ b/tests/test-filevercmp.c
@@ -29,6 +29,8 @@ static const char *const examples[] =
"",
".",
"..",
+ ".0",
+ ".9",
".A",
".Z",
".a~",
@@ -39,8 +41,6 @@ static const char *const examples[] =
".zz~",
".zz",
".zz.~1~",
- ".0",
- ".9",
".zz.0",
".\1",
".\1.txt",