#!/bin/sh global test_description := ''Test git check-ref-format'' source ./test-lib.sh proc valid_ref { global prereq := '' matchstr $1 { [A-Z!]* { global prereq := $1 shift } } global desc := ""ref name '$1' is valid$(2:+ with options $2)"" test_expect_success $prereq $desc " git check-ref-format $2 '$1' " } proc invalid_ref { global prereq := '' matchstr $1 { [A-Z!]* { global prereq := $1 shift } } global desc := ""ref name '$1' is invalid$(2:+ with options $2)"" test_expect_success $prereq $desc " test_must_fail git check-ref-format $2 '$1' " } invalid_ref '' invalid_ref !MINGW '/' invalid_ref !MINGW '/' --allow-onelevel invalid_ref !MINGW '/' --normalize invalid_ref !MINGW '/' '--allow-onelevel --normalize' valid_ref 'foo/bar/baz' valid_ref 'foo/bar/baz' --normalize invalid_ref 'refs///heads/foo' valid_ref 'refs///heads/foo' --normalize invalid_ref 'heads/foo/' invalid_ref !MINGW '/heads/foo' valid_ref !MINGW '/heads/foo' --normalize invalid_ref '///heads/foo' valid_ref '///heads/foo' --normalize invalid_ref './foo' invalid_ref './foo/bar' invalid_ref 'foo/./bar' invalid_ref 'foo/bar/.' invalid_ref '.refs/foo' invalid_ref 'refs/heads/foo.' invalid_ref 'heads/foo..bar' invalid_ref 'heads/foo?bar' valid_ref 'foo./bar' invalid_ref 'heads/foo.lock' invalid_ref 'heads///foo.lock' invalid_ref 'foo.lock/bar' invalid_ref 'foo.lock///bar' valid_ref 'heads/foo@bar' invalid_ref 'heads/v@{ation' invalid_ref 'heads/foo\bar' invalid_ref $[printf 'heads/foo\t] invalid_ref $[printf 'heads/foo\177] valid_ref $[printf 'heads/fu\303\237] valid_ref 'heads/*foo/bar' --refspec-pattern valid_ref 'heads/foo*/bar' --refspec-pattern valid_ref 'heads/f*o/bar' --refspec-pattern invalid_ref 'heads/f*o*/bar' --refspec-pattern invalid_ref 'heads/foo*/bar*' --refspec-pattern global ref := ''foo'' invalid_ref $ref valid_ref $ref --allow-onelevel invalid_ref $ref --refspec-pattern valid_ref $ref '--refspec-pattern --allow-onelevel' invalid_ref $ref --normalize valid_ref $ref '--allow-onelevel --normalize' global ref := ''foo/bar'' valid_ref $ref valid_ref $ref --allow-onelevel valid_ref $ref --refspec-pattern valid_ref $ref '--refspec-pattern --allow-onelevel' valid_ref $ref --normalize global ref := ''foo/*'' invalid_ref $ref invalid_ref $ref --allow-onelevel valid_ref $ref --refspec-pattern valid_ref $ref '--refspec-pattern --allow-onelevel' global ref := ''*/foo'' invalid_ref $ref invalid_ref $ref --allow-onelevel valid_ref $ref --refspec-pattern valid_ref $ref '--refspec-pattern --allow-onelevel' invalid_ref $ref --normalize valid_ref $ref '--refspec-pattern --normalize' global ref := ''foo/*/bar'' invalid_ref $ref invalid_ref $ref --allow-onelevel valid_ref $ref --refspec-pattern valid_ref $ref '--refspec-pattern --allow-onelevel' global ref := ''*'' invalid_ref $ref invalid_ref $ref --allow-onelevel invalid_ref $ref --refspec-pattern valid_ref $ref '--refspec-pattern --allow-onelevel' global ref := ''foo/*/*'' invalid_ref $ref --refspec-pattern invalid_ref $ref '--refspec-pattern --allow-onelevel' global ref := ''*/foo/*'' invalid_ref $ref --refspec-pattern invalid_ref $ref '--refspec-pattern --allow-onelevel' global ref := ''*/*/foo'' invalid_ref $ref --refspec-pattern invalid_ref $ref '--refspec-pattern --allow-onelevel' global ref := ''/foo'' invalid_ref !MINGW $ref invalid_ref !MINGW $ref --allow-onelevel invalid_ref !MINGW $ref --refspec-pattern invalid_ref !MINGW $ref '--refspec-pattern --allow-onelevel' invalid_ref !MINGW $ref --normalize valid_ref !MINGW $ref '--allow-onelevel --normalize' invalid_ref !MINGW $ref '--refspec-pattern --normalize' valid_ref !MINGW $ref '--refspec-pattern --allow-onelevel --normalize' test_expect_success "check-ref-format --branch @{-1}" ' T=$(git write-tree) && sha1=$(echo A | git commit-tree $T) && git update-ref refs/heads/master $sha1 && git update-ref refs/remotes/origin/master $sha1 && git checkout master && git checkout origin/master && git checkout master && refname=$(git check-ref-format --branch @{-1}) && test "$refname" = "$sha1" && refname2=$(git check-ref-format --branch @{-2}) && test "$refname2" = master' test_expect_success 'check-ref-format --branch from subdir' ' mkdir subdir && T=$(git write-tree) && sha1=$(echo A | git commit-tree $T) && git update-ref refs/heads/master $sha1 && git update-ref refs/remotes/origin/master $sha1 && git checkout master && git checkout origin/master && git checkout master && refname=$( cd subdir && git check-ref-format --branch @{-1} ) && test "$refname" = "$sha1" ' proc valid_ref_normalized { global prereq := '' matchstr $1 { [A-Z!]* { global prereq := $1 shift } } test_expect_success $prereq "ref name '$1' simplifies to '$2'" " refname=\$(git check-ref-format --normalize '$1') && test \"\$refname\" = '$2' " } proc invalid_ref_normalized { global prereq := '' matchstr $1 { [A-Z!]* { global prereq := $1 shift } } test_expect_success $prereq "check-ref-format --normalize rejects '$1'" " test_must_fail git check-ref-format --normalize '$1' " } valid_ref_normalized 'heads/foo' 'heads/foo' valid_ref_normalized 'refs///heads/foo' 'refs/heads/foo' valid_ref_normalized !MINGW '/heads/foo' 'heads/foo' valid_ref_normalized '///heads/foo' 'heads/foo' invalid_ref_normalized 'foo' invalid_ref_normalized !MINGW '/foo' invalid_ref_normalized 'heads/foo/../bar' invalid_ref_normalized 'heads/./foo' invalid_ref_normalized 'heads\foo' invalid_ref_normalized 'heads/foo.lock' invalid_ref_normalized 'heads///foo.lock' invalid_ref_normalized 'foo.lock/bar' invalid_ref_normalized 'foo.lock///bar' test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"Test git check-ref-format">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (FuncDef name: valid_ref body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:prereq) op:Equal rhs:{(SQ )} spids:[22])] spids: [22] ) (Case to_match: {($ VSub_Number "$1")} arms: [ (case_arm pat_list: [{(Lit_Other "[") (A-Z) (KW_Bang "!") (Lit_Other "]") (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:prereq) op: Equal rhs: {($ VSub_Number "$1")} spids: [40] ) ] spids: [40] ) (C {(shift)}) ] spids: [32 37 -1 47] ) ] spids: [25 29 47] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:desc) op: Equal rhs: { (DQ ("ref name '") ($ VSub_Number "$1") ("' is valid") (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonPlus arg_word: {(" with options ") ($ VSub_Number "$2")} ) spids: [55 60] ) ) } spids: [50] ) ] spids: [50] ) (C {(test_expect_success)} {($ VSub_Name "$prereq")} {(DQ ($ VSub_Name "$desc"))} { (DQ ("\n") ("\t\tgit check-ref-format ") ($ VSub_Number "$2") (" '") ($ VSub_Number "$1") ("'\n") ("\t") ) } ) ] spids: [19] ) spids: [15 18] ) (FuncDef name: invalid_ref body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:prereq) op:Equal rhs:{(SQ )} spids:[91])] spids: [91] ) (Case to_match: {($ VSub_Number "$1")} arms: [ (case_arm pat_list: [{(Lit_Other "[") (A-Z) (KW_Bang "!") (Lit_Other "]") (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:prereq) op: Equal rhs: {($ VSub_Number "$1")} spids: [109] ) ] spids: [109] ) (C {(shift)}) ] spids: [101 106 -1 116] ) ] spids: [94 98 116] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:desc) op: Equal rhs: { (DQ ("ref name '") ($ VSub_Number "$1") ("' is invalid") (BracedVarSub token: suffix_op: (StringUnary op_id: VTest_ColonPlus arg_word: {(" with options ") ($ VSub_Number "$2")} ) spids: [124 129] ) ) } spids: [119] ) ] spids: [119] ) (C {(test_expect_success)} {($ VSub_Name "$prereq")} {(DQ ($ VSub_Name "$desc"))} { (DQ ("\n") ("\t\ttest_must_fail git check-ref-format ") ($ VSub_Number "$2") (" '") ($ VSub_Number "$1") ("'\n") ("\t") ) } ) ] spids: [88] ) spids: [84 87] ) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(SQ )}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(SQ )} {(--allow-onelevel)}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(SQ )} {(--normalize)}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(SQ )} {(SQ <"--allow-onelevel --normalize">)}) (C {(valid_ref)} {(SQ )}) (C {(valid_ref)} {(SQ )} {(--normalize)}) (C {(invalid_ref)} {(SQ )}) (C {(valid_ref)} {(SQ )} {(--normalize)}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(SQ )}) (C {(valid_ref)} {(KW_Bang "!") (MINGW)} {(SQ )} {(--normalize)}) (C {(invalid_ref)} {(SQ )}) (C {(valid_ref)} {(SQ )} {(--normalize)}) (C {(invalid_ref)} {(SQ <./foo>)}) (C {(invalid_ref)} {(SQ <./foo/bar>)}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ <.refs/foo>)}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ <"heads/foo?bar">)}) (C {(valid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ )}) (C {(invalid_ref)} {(SQ )}) (C {(valid_ref)} {(SQ <"heads/foo@bar">)}) (C {(invalid_ref)} {(SQ <"heads/v@{ation">)}) (C {(invalid_ref)} {(SQ <"heads/foo\\bar">)}) (C {(invalid_ref)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"heads/foo\\t">)})]) left_token: spids: [370 376] ) ) } ) (C {(invalid_ref)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"heads/foo\\177">)})]) left_token: spids: [382 388] ) ) } ) (C {(valid_ref)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(printf)} {(SQ <"heads/fu\\303\\237">)})]) left_token: spids: [394 400] ) ) } ) (C {(valid_ref)} {(SQ <"heads/*foo/bar">)} {(--refspec-pattern)}) (C {(valid_ref)} {(SQ <"heads/foo*/bar">)} {(--refspec-pattern)}) (C {(valid_ref)} {(SQ <"heads/f*o/bar">)} {(--refspec-pattern)}) (C {(invalid_ref)} {(SQ <"heads/f*o*/bar">)} {(--refspec-pattern)}) (C {(invalid_ref)} {(SQ <"heads/foo*/bar*">)} {(--refspec-pattern)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ )} spids:[444])] spids: [444] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--allow-onelevel)}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--normalize)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--allow-onelevel --normalize">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ )} spids:[500])] spids: [500] ) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--allow-onelevel)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--normalize)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ <"foo/*">)} spids:[546])] spids: [546] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--allow-onelevel)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ <"*/foo">)} spids:[584])] spids: [584] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--allow-onelevel)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--normalize)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --normalize">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ <"foo/*/bar">)} spids:[640])] spids: [640] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--allow-onelevel)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ <"*">)} spids:[678])] spids: [678] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--allow-onelevel)}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(valid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ <"foo/*/*">)} spids:[716])] spids: [716] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ <"*/foo/*">)} spids:[740])] spids: [740] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ <"*/*/foo">)} spids:[764])] spids: [764] ) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(invalid_ref)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:ref) op:Equal rhs:{(SQ )} spids:[788])] spids: [788] ) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))} {(--allow-onelevel)}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))} {(--refspec-pattern)}) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel">)} ) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))} {(--normalize)}) (C {(valid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--allow-onelevel --normalize">)} ) (C {(invalid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --normalize">)} ) (C {(valid_ref)} {(KW_Bang "!") (MINGW)} {(DQ ($ VSub_Name "$ref"))} {(SQ <"--refspec-pattern --allow-onelevel --normalize">)} ) (C {(test_expect_success)} {(DQ ("check-ref-format --branch @{-1}"))} { (SQ <"\n"> <"\tT=$(git write-tree) &&\n"> <"\tsha1=$(echo A | git commit-tree $T) &&\n"> <"\tgit update-ref refs/heads/master $sha1 &&\n"> <"\tgit update-ref refs/remotes/origin/master $sha1 &&\n"> <"\tgit checkout master &&\n"> <"\tgit checkout origin/master &&\n"> <"\tgit checkout master &&\n"> <"\trefname=$(git check-ref-format --branch @{-1}) &&\n"> <"\ttest \"$refname\" = \"$sha1\" &&\n"> <"\trefname2=$(git check-ref-format --branch @{-2}) &&\n"> <"\ttest \"$refname2\" = master"> ) } ) (C {(test_expect_success)} {(SQ <"check-ref-format --branch from subdir">)} { (SQ <"\n"> <"\tmkdir subdir &&\n"> <"\n"> <"\tT=$(git write-tree) &&\n"> <"\tsha1=$(echo A | git commit-tree $T) &&\n"> <"\tgit update-ref refs/heads/master $sha1 &&\n"> <"\tgit update-ref refs/remotes/origin/master $sha1 &&\n"> <"\tgit checkout master &&\n"> <"\tgit checkout origin/master &&\n"> <"\tgit checkout master &&\n"> <"\trefname=$(\n"> <"\t\tcd subdir &&\n"> <"\t\tgit check-ref-format --branch @{-1}\n"> <"\t) &&\n"> <"\ttest \"$refname\" = \"$sha1\"\n"> ) } ) (FuncDef name: valid_ref_normalized body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:prereq) op:Equal rhs:{(SQ )} spids:[942])] spids: [942] ) (Case to_match: {($ VSub_Number "$1")} arms: [ (case_arm pat_list: [{(Lit_Other "[") (A-Z) (KW_Bang "!") (Lit_Other "]") (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:prereq) op: Equal rhs: {($ VSub_Number "$1")} spids: [960] ) ] spids: [960] ) (C {(shift)}) ] spids: [952 957 -1 967] ) ] spids: [945 949 967] ) (C {(test_expect_success)} {($ VSub_Name "$prereq")} { (DQ ("ref name '") ($ VSub_Number "$1") ("' simplifies to '") ($ VSub_Number "$2") ("'")) } { (DQ ("\n") ("\t\trefname=") (EscapedLiteralPart token:) ("(git check-ref-format --normalize '") ($ VSub_Number "$1") ("') &&\n") ("\t\ttest ") (EscapedLiteralPart token:) (EscapedLiteralPart token:) (refname) (EscapedLiteralPart token:) (" = '") ($ VSub_Number "$2") ("'\n") ("\t") ) } ) ] spids: [939] ) spids: [935 938] ) (FuncDef name: invalid_ref_normalized body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:prereq) op:Equal rhs:{(SQ )} spids:[1009])] spids: [1009] ) (Case to_match: {($ VSub_Number "$1")} arms: [ (case_arm pat_list: [{(Lit_Other "[") (A-Z) (KW_Bang "!") (Lit_Other "]") (Lit_Other "*")}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:prereq) op: Equal rhs: {($ VSub_Number "$1")} spids: [1027] ) ] spids: [1027] ) (C {(shift)}) ] spids: [1019 1024 -1 1034] ) ] spids: [1012 1016 1034] ) (C {(test_expect_success)} {($ VSub_Name "$prereq")} {(DQ ("check-ref-format --normalize rejects '") ($ VSub_Number "$1") ("'"))} { (DQ ("\n") ("\t\ttest_must_fail git check-ref-format --normalize '") ($ VSub_Number "$1") ("'\n") ("\t") ) } ) ] spids: [1006] ) spids: [1002 1005] ) (C {(valid_ref_normalized)} {(SQ )} {(SQ )}) (C {(valid_ref_normalized)} {(SQ )} {(SQ )}) (C {(valid_ref_normalized)} {(KW_Bang "!") (MINGW)} {(SQ )} {(SQ )}) (C {(valid_ref_normalized)} {(SQ )} {(SQ )}) (C {(invalid_ref_normalized)} {(SQ )}) (C {(invalid_ref_normalized)} {(KW_Bang "!") (MINGW)} {(SQ )}) (C {(invalid_ref_normalized)} {(SQ )}) (C {(invalid_ref_normalized)} {(SQ )}) (C {(invalid_ref_normalized)} {(SQ <"heads\\foo">)}) (C {(invalid_ref_normalized)} {(SQ )}) (C {(invalid_ref_normalized)} {(SQ )}) (C {(invalid_ref_normalized)} {(SQ )}) (C {(invalid_ref_normalized)} {(SQ )}) (C {(test_done)}) ] )