summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-03-01 15:38:54 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-03-01 15:38:54 -0500
commit10a408c15a77dfad65eda026f230f7e571d8d617 (patch)
treebd11fff5a5ab1b91a46cd83156d552fb39e5e8e5 /tests.sh
parent1c184e718f5745cf3a53a3c389814a792e73aa51 (diff)
downloadbfs-10a408c15a77dfad65eda026f230f7e571d8d617.tar.xz
tests: Add a test for -printf %u/%g with a low ulimit
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index 2a52049..6ebdc50 100755
--- a/tests.sh
+++ b/tests.sh
@@ -529,6 +529,7 @@ gnu_tests=(
test_printf_nul
test_printf_Y_error
test_printf_H
+ test_printf_u_g_ulimit
test_quit
test_quit_child
@@ -1941,6 +1942,12 @@ function test_printf_H() {
bfs_diff basic links -printf '%%p(%p) %%d(%d) %%f(%f) %%h(%h) %%H(%H) %%P(%P) %%y(%y)\n'
}
+function test_printf_u_g_ulimit() {
+ closefrom 4
+ ulimit -n 16
+ [ "$(invoke_bfs deep -printf '%u %g\n' | uniq)" = "$(id -un) $(id -gn)" ]
+}
+
function test_fstype() {
fstype="$(invoke_bfs basic -maxdepth 0 -printf '%F\n')"
bfs_diff basic -fstype "$fstype"