Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t4133-apply-filenames.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t4133-apply-filenames.sh` 63 lines ยท 1311 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2010 Andreas Gruenbacher 4 # 5 6 test_description='git apply filename consistency check' 7 8 9 . ./test-lib.sh 10 11 test_expect_success setup ' 12 cat > bad1.patch < bad2.patch <err && 34 test_grep "inconsistent new filename" err && 35 test_must_fail git apply bad2.patch 2>err && 36 test_grep "inconsistent old filename" err 37 ' 38 39 test_expect_success 'apply diff with new filename missing from headers' ' 40 cat >missing_new_filename.diff <<-\EOF && 41 diff --git a/f b/f 42 index `0000000`..`d00491f` 43 --- a/f 44 @@ -0,0 +1 @@ 45 +1 46 EOF 47 test_must_fail git apply missing_new_filename.diff 2>err && 48 test_grep "lacks filename information" err 49 ' 50 51 test_expect_success 'apply diff with old filename missing from headers' ' 52 cat >missing_old_filename.diff <<-\EOF && 53 diff --git a/f b/f 54 index `d00491f`..`0000000` 55 +++ b/f 56 @@ -1 +0,0 @@ 57 -1 58 EOF 59 test_must_fail git apply missing_old_filename.diff 2>err && 60 test_grep "lacks filename information" err 61 ' 62 63 test_done