Ignore:
Timestamp:
Jun 23, 2014, 9:45:51 PM (11 years ago)
Author:
dmik
Message:

git: Merge version 2.0.0 from vendor to dmik branch.

Location:
git/branches/dmik
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • git/branches/dmik

  • TabularUnified git/branches/dmik/t/t1401-symbolic-ref.sh

    r347 r782  
    3434reset_to_sane
    3535
     36test_expect_success 'symbolic-ref deletes HEAD' '
     37        git symbolic-ref -d HEAD &&
     38        test_path_is_file .git/refs/heads/foo &&
     39        test_path_is_missing .git/HEAD
     40'
     41reset_to_sane
     42
     43test_expect_success 'symbolic-ref deletes dangling HEAD' '
     44        git symbolic-ref HEAD refs/heads/missing &&
     45        git symbolic-ref -d HEAD &&
     46        test_path_is_missing .git/refs/heads/missing &&
     47        test_path_is_missing .git/HEAD
     48'
     49reset_to_sane
     50
     51test_expect_success 'symbolic-ref fails to delete missing FOO' '
     52        echo "fatal: Cannot delete FOO, not a symbolic ref" >expect &&
     53        test_must_fail git symbolic-ref -d FOO >actual 2>&1 &&
     54        test_cmp expect actual
     55'
     56reset_to_sane
     57
     58test_expect_success 'symbolic-ref fails to delete real ref' '
     59        echo "fatal: Cannot delete refs/heads/foo, not a symbolic ref" >expect &&
     60        test_must_fail git symbolic-ref -d refs/heads/foo >actual 2>&1 &&
     61        test_path_is_file .git/refs/heads/foo &&
     62        test_cmp expect actual
     63'
     64reset_to_sane
     65
    3666test_done
Note: See TracChangeset for help on using the changeset viewer.