summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-07-23 15:19:17 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-07-23 15:22:02 -0400
commit972dcc2973b160cdaad2c4ce0df3616a9f234759 (patch)
treee33713ed22a3e37f0bd3fda2a4808dc152173674
parent4649cf3132217fe9f975f7e16f47928e5d7680bf (diff)
downloadbfs-972dcc2973b160cdaad2c4ce0df3616a9f234759.tar.xz
tests: Make more tests POSIX-compliant
-rw-r--r--tests/common/name_slash.sh1
-rw-r--r--tests/common/name_slashes.sh1
-rw-r--r--tests/posix/atime.out (renamed from tests/common/atime.out)0
-rw-r--r--tests/posix/atime.sh (renamed from tests/common/atime.sh)8
-rw-r--r--tests/posix/mtime.out (renamed from tests/common/mtime.out)0
-rw-r--r--tests/posix/mtime.sh (renamed from tests/common/mtime.sh)8
-rw-r--r--tests/posix/name_slash.out (renamed from tests/common/name_slash.out)0
-rw-r--r--tests/posix/name_slash.sh1
-rw-r--r--tests/posix/name_slashes.out (renamed from tests/common/name_slashes.out)0
-rw-r--r--tests/posix/name_slashes.sh1
10 files changed, 10 insertions, 10 deletions
diff --git a/tests/common/name_slash.sh b/tests/common/name_slash.sh
deleted file mode 100644
index 8d89623..0000000
--- a/tests/common/name_slash.sh
+++ /dev/null
@@ -1 +0,0 @@
-bfs_diff / -maxdepth 0 -name /
diff --git a/tests/common/name_slashes.sh b/tests/common/name_slashes.sh
deleted file mode 100644
index 78d0a84..0000000
--- a/tests/common/name_slashes.sh
+++ /dev/null
@@ -1 +0,0 @@
-bfs_diff /// -maxdepth 0 -name /
diff --git a/tests/common/atime.out b/tests/posix/atime.out
index 5ed206b..5ed206b 100644
--- a/tests/common/atime.out
+++ b/tests/posix/atime.out
diff --git a/tests/common/atime.sh b/tests/posix/atime.sh
index 4f2299d..25dfd7e 100644
--- a/tests/common/atime.sh
+++ b/tests/posix/atime.sh
@@ -9,7 +9,7 @@ now=$(epoch_time)
"$XTOUCH" -at "@$((now))" now
"$XTOUCH" -at "@$((now + 60 * 60 * 24))" tomorrow
-bfs_diff . -mindepth 1 \
- \( -atime -1 -exec printf -- '-atime -1: %s\n' {} \; -o -true \) \
- \( -atime 1 -exec printf -- '-atime 1: %s\n' {} \; -o -true \) \
- \( -atime +1 -exec printf -- '-atime +1: %s\n' {} \; -o -true \)
+bfs_diff . \! -name . \
+ \( -atime -1 -exec printf -- '-atime -1: %s\n' {} \; -o -prune \) \
+ \( -atime 1 -exec printf -- '-atime 1: %s\n' {} \; -o -prune \) \
+ \( -atime +1 -exec printf -- '-atime +1: %s\n' {} \; -o -prune \)
diff --git a/tests/common/mtime.out b/tests/posix/mtime.out
index 91f0114..91f0114 100644
--- a/tests/common/mtime.out
+++ b/tests/posix/mtime.out
diff --git a/tests/common/mtime.sh b/tests/posix/mtime.sh
index 910f64d..8367631 100644
--- a/tests/common/mtime.sh
+++ b/tests/posix/mtime.sh
@@ -9,7 +9,7 @@ now=$(epoch_time)
"$XTOUCH" -mt "@$((now))" now
"$XTOUCH" -mt "@$((now + 60 * 60 * 24))" tomorrow
-bfs_diff . -mindepth 1 \
- \( -mtime -1 -exec printf -- '-mtime -1: %s\n' {} \; -o -true \) \
- \( -mtime 1 -exec printf -- '-mtime 1: %s\n' {} \; -o -true \) \
- \( -mtime +1 -exec printf -- '-mtime +1: %s\n' {} \; -o -true \)
+bfs_diff . \! -name . \
+ \( -mtime -1 -exec printf -- '-mtime -1: %s\n' {} \; -o -prune \) \
+ \( -mtime 1 -exec printf -- '-mtime 1: %s\n' {} \; -o -prune \) \
+ \( -mtime +1 -exec printf -- '-mtime +1: %s\n' {} \; -o -prune \)
diff --git a/tests/common/name_slash.out b/tests/posix/name_slash.out
index b498fd4..b498fd4 100644
--- a/tests/common/name_slash.out
+++ b/tests/posix/name_slash.out
diff --git a/tests/posix/name_slash.sh b/tests/posix/name_slash.sh
new file mode 100644
index 0000000..b42b145
--- /dev/null
+++ b/tests/posix/name_slash.sh
@@ -0,0 +1 @@
+bfs_diff / -prune -name /
diff --git a/tests/common/name_slashes.out b/tests/posix/name_slashes.out
index 187b81f..187b81f 100644
--- a/tests/common/name_slashes.out
+++ b/tests/posix/name_slashes.out
diff --git a/tests/posix/name_slashes.sh b/tests/posix/name_slashes.sh
new file mode 100644
index 0000000..45a39d3
--- /dev/null
+++ b/tests/posix/name_slashes.sh
@@ -0,0 +1 @@
+bfs_diff /// -prune -name /