t1408: add a test of stale packed refs covered by loose refs
[gitweb.git] / t / t1406-submodule-ref-store.sh
index 22214ebd326145214ea876e1bdd538b2b5158196..c32d4cc4652a4496ce8fa6aa1c10c797ae7d760a 100755 (executable)
@@ -31,7 +31,7 @@ test_expect_success 'create_symref() not allowed' '
 '
 
 test_expect_success 'delete_refs() not allowed' '
-       test_must_fail $RUN delete-refs 0 FOO refs/tags/new-tag
+       test_must_fail $RUN delete-refs 0 nothing FOO refs/tags/new-tag
 '
 
 test_expect_success 'rename_refs() not allowed' '
@@ -47,6 +47,12 @@ test_expect_success 'for_each_ref(refs/heads/)' '
        test_cmp expected actual
 '
 
+test_expect_success 'for_each_ref() is sorted' '
+       $RUN for-each-ref refs/heads/ | cut -c 42- >actual &&
+       sort actual > expected &&
+       test_cmp expected actual
+'
+
 test_expect_success 'resolve_ref(master)' '
        SHA1=`git -C sub rev-parse master` &&
        echo "$SHA1 refs/heads/master 0x0" >expected &&