[PATCH 1/1] test-rewrite: don't use date for test output (length varies)

0 views
Skip to first unread message

Rob Browning

unread,
Mar 6, 2026, 6:11:47 PM (8 days ago) Mar 6
to bup-...@googlegroups.com
Among other things, the date output is affected by the locale, and the
expected output currently includes the length.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---

Pushed to main.

test/ext/test-rewrite | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/ext/test-rewrite b/test/ext/test-rewrite
index 1ad8a972..fc042bad 100755
--- a/test/ext/test-rewrite
+++ b/test/ext/test-rewrite
@@ -150,11 +150,11 @@ WVSTART "rewrite trees without .bupm"
WVPASS rm -rf src repo
WVPASS mkdir src
# Test rewrite db cases with multiple versions of x (numbers ensure ordering)
-WVPASS date > src/x
+WVPASS echo x > src/x
WVPASS cp -p src/x src/x-1-with-exec
WVPASS cp -p src/x src/x-2-without-exec
WVPASS chmod +x src/x-1-with-exec
-WVPASS date > src/y
+WVPASS echo y > src/y
WVPASS bup init repo
WVPASS git --git-dir repo --work-tree "$(pwd)" add src
WVPASS git --git-dir repo --work-tree "$(pwd)" commit -am save
@@ -162,10 +162,10 @@ WVPASS git --git-dir repo config bup.split.trees true
WVPASS git --git-dir repo config bup.split.files legacy:16
WVPASS bup -d repo get --rewrite -s repo --append: main main-rewrite
WVPASSEQ "$(bup -d repo ls -ln main-rewrite/latest/src | tr -s ' ' ' ')" \
-'-rw-r--r-- ?/? 29 ????-??-?? ??:?? x
--rwxr-xr-x ?/? 29 ????-??-?? ??:?? x-1-with-exec
--rw-r--r-- ?/? 29 ????-??-?? ??:?? x-2-without-exec
--rw-r--r-- ?/? 29 ????-??-?? ??:?? y'
+'-rw-r--r-- ?/? 2 ????-??-?? ??:?? x
+-rwxr-xr-x ?/? 2 ????-??-?? ??:?? x-1-with-exec
+-rw-r--r-- ?/? 2 ????-??-?? ??:?? x-2-without-exec
+-rw-r--r-- ?/? 2 ????-??-?? ??:?? y'
WVPASS git --git-dir repo ls-tree main-rewrite:src | WVPASS grep -vE '\.bupm$'
WVPASS rm -rf repo restore src

--
2.47.3

Reply all
Reply to author
Forward
0 new messages