mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
t1091: improve here-docs
t1091-sparse-checkout-builtin.sh uses here-docs to populate the expected contents of the sparse-checkout file. These do not use shell interpolation, so use "-\EOF" instead of "-EOF". Also use proper tabbing. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
522e641748
commit
d622c34396
1 changed files with 49 additions and 49 deletions
|
@ -46,7 +46,7 @@ test_expect_success 'git sparse-checkout list (empty)' '
|
||||||
|
|
||||||
test_expect_success 'git sparse-checkout list (populated)' '
|
test_expect_success 'git sparse-checkout list (populated)' '
|
||||||
test_when_finished rm -f repo/.git/info/sparse-checkout &&
|
test_when_finished rm -f repo/.git/info/sparse-checkout &&
|
||||||
cat >repo/.git/info/sparse-checkout <<-EOF &&
|
cat >repo/.git/info/sparse-checkout <<-\EOF &&
|
||||||
/folder1/*
|
/folder1/*
|
||||||
/deep/
|
/deep/
|
||||||
**/a
|
**/a
|
||||||
|
@ -59,7 +59,7 @@ test_expect_success 'git sparse-checkout list (populated)' '
|
||||||
|
|
||||||
test_expect_success 'git sparse-checkout init' '
|
test_expect_success 'git sparse-checkout init' '
|
||||||
git -C repo sparse-checkout init &&
|
git -C repo sparse-checkout init &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
EOF
|
EOF
|
||||||
|
@ -70,7 +70,7 @@ test_expect_success 'git sparse-checkout init' '
|
||||||
|
|
||||||
test_expect_success 'git sparse-checkout list after init' '
|
test_expect_success 'git sparse-checkout list after init' '
|
||||||
git -C repo sparse-checkout list >actual &&
|
git -C repo sparse-checkout list >actual &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
EOF
|
EOF
|
||||||
|
@ -80,7 +80,7 @@ test_expect_success 'git sparse-checkout list after init' '
|
||||||
test_expect_success 'init with existing sparse-checkout' '
|
test_expect_success 'init with existing sparse-checkout' '
|
||||||
echo "*folder*" >> repo/.git/info/sparse-checkout &&
|
echo "*folder*" >> repo/.git/info/sparse-checkout &&
|
||||||
git -C repo sparse-checkout init &&
|
git -C repo sparse-checkout init &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
*folder*
|
*folder*
|
||||||
|
@ -92,7 +92,7 @@ test_expect_success 'init with existing sparse-checkout' '
|
||||||
test_expect_success 'clone --sparse' '
|
test_expect_success 'clone --sparse' '
|
||||||
git clone --sparse repo clone &&
|
git clone --sparse repo clone &&
|
||||||
git -C clone sparse-checkout list >actual &&
|
git -C clone sparse-checkout list >actual &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
EOF
|
EOF
|
||||||
|
@ -116,7 +116,7 @@ test_expect_success 'set enables config' '
|
||||||
|
|
||||||
test_expect_success 'set sparse-checkout using builtin' '
|
test_expect_success 'set sparse-checkout using builtin' '
|
||||||
git -C repo sparse-checkout set "/*" "!/*/" "*folder*" &&
|
git -C repo sparse-checkout set "/*" "!/*/" "*folder*" &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
*folder*
|
*folder*
|
||||||
|
@ -128,7 +128,7 @@ test_expect_success 'set sparse-checkout using builtin' '
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'set sparse-checkout using --stdin' '
|
test_expect_success 'set sparse-checkout using --stdin' '
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
/folder1/
|
/folder1/
|
||||||
|
@ -179,7 +179,7 @@ test_expect_success 'cone mode: init and set' '
|
||||||
check_files repo a deep &&
|
check_files repo a deep &&
|
||||||
check_files repo/deep a deeper1 &&
|
check_files repo/deep a deeper1 &&
|
||||||
check_files repo/deep/deeper1 a deepest &&
|
check_files repo/deep/deeper1 a deepest &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
/deep/
|
/deep/
|
||||||
|
@ -189,7 +189,7 @@ test_expect_success 'cone mode: init and set' '
|
||||||
/deep/deeper1/deepest/
|
/deep/deeper1/deepest/
|
||||||
EOF
|
EOF
|
||||||
test_cmp expect repo/.git/info/sparse-checkout &&
|
test_cmp expect repo/.git/info/sparse-checkout &&
|
||||||
git -C repo sparse-checkout set --stdin 2>err <<-EOF &&
|
git -C repo sparse-checkout set --stdin 2>err <<-\EOF &&
|
||||||
folder1
|
folder1
|
||||||
folder2
|
folder2
|
||||||
EOF
|
EOF
|
||||||
|
@ -198,7 +198,7 @@ test_expect_success 'cone mode: init and set' '
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'cone mode: list' '
|
test_expect_success 'cone mode: list' '
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
folder1
|
folder1
|
||||||
folder2
|
folder2
|
||||||
EOF
|
EOF
|
||||||
|
@ -211,7 +211,7 @@ test_expect_success 'cone mode: list' '
|
||||||
test_expect_success 'cone mode: set with nested folders' '
|
test_expect_success 'cone mode: set with nested folders' '
|
||||||
git -C repo sparse-checkout set deep deep/deeper1/deepest 2>err &&
|
git -C repo sparse-checkout set deep deep/deeper1/deepest 2>err &&
|
||||||
test_line_count = 0 err &&
|
test_line_count = 0 err &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
/deep/
|
/deep/
|
||||||
|
@ -271,7 +271,7 @@ test_expect_success 'sparse-checkout (init|set|disable) fails with dirty status'
|
||||||
test_expect_success 'cone mode: set with core.ignoreCase=true' '
|
test_expect_success 'cone mode: set with core.ignoreCase=true' '
|
||||||
git -C repo sparse-checkout init --cone &&
|
git -C repo sparse-checkout init --cone &&
|
||||||
git -C repo -c core.ignoreCase=true sparse-checkout set folder1 &&
|
git -C repo -c core.ignoreCase=true sparse-checkout set folder1 &&
|
||||||
cat >expect <<-EOF &&
|
cat >expect <<-\EOF &&
|
||||||
/*
|
/*
|
||||||
!/*/
|
!/*/
|
||||||
/folder1/
|
/folder1/
|
||||||
|
|
Loading…
Reference in a new issue