aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t8020-last-modified.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/t/t8020-last-modified.sh b/t/t8020-last-modified.sh
index a4c1114ee2..43f38937ba 100755
--- a/t/t8020-last-modified.sh
+++ b/t/t8020-last-modified.sh
@@ -85,6 +85,41 @@ test_expect_success 'last-modified subdir recursive' '
EOF
'
+test_expect_success 'last-modified subdir non-recursive' '
+ check_last_modified a <<-\EOF
+ 3 a
+ EOF
+'
+
+test_expect_success 'last-modified path in subdir non-recursive' '
+ check_last_modified a/file <<-\EOF
+ 2 a/file
+ EOF
+'
+
+test_expect_success 'last-modified subdir with wildcard non-recursive' '
+ check_last_modified a/* <<-\EOF
+ 3 a/b
+ 2 a/file
+ EOF
+'
+
+test_expect_success 'last-modified with negative max-depth' '
+ check_last_modified --max-depth=-1 <<-\EOF
+ 3 a/b/file
+ 2 a/file
+ 1 file
+ EOF
+'
+
+test_expect_success 'last-modified with max-depth of 1' '
+ check_last_modified --max-depth=1 <<-\EOF
+ 3 a/b
+ 2 a/file
+ 1 file
+ EOF
+'
+
test_expect_success 'last-modified from non-HEAD commit' '
check_last_modified HEAD^ <<-\EOF
2 a