From 484cd263a245963dcb5aa767de6c39f4f580b145 Mon Sep 17 00:00:00 2001 From: Douglas Wilson Date: Fri, 6 Sep 2019 07:48:03 +0100 Subject: [PATCH] Add a failing test for a subdir ignoring itself The .gitignore in foo causes foo itself to be ignored --- tests/default.nix | 1 + tests/testdata.nix | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/default.nix b/tests/default.nix index d8a9ebd..4eef480 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -20,5 +20,6 @@ in subdir-3 = runner.makeTest { name = "subdir-3"; rootDir = testdata.sourceUnfiltered + "/test-tree"; subpath = "3-wildcards"; }; subdir-4 = runner.makeTest { name = "subdir-4"; rootDir = testdata.sourceUnfiltered + "/test-tree"; subpath = "4-escapes"; }; subdir-9 = runner.makeTest { name = "subdir-9"; rootDir = testdata.sourceUnfiltered + "/test-tree"; subpath = "9-expected"; }; + subdir-10 = runner.makeTest { name = "subdir-10"; rootDir = testdata.sourceUnfiltered + "/test-tree"; subpath = "10-subdir-ignoring-itself"; }; } \ No newline at end of file diff --git a/tests/testdata.nix b/tests/testdata.nix index ac7c134..d26ae7e 100644 --- a/tests/testdata.nix +++ b/tests/testdata.nix @@ -30,6 +30,9 @@ let touches 5-directory {1,2,3,4,5,^,$,^$,$^,[,[[,],]],]]],ab,bb,\\,\\\\} touches 9-expected {unfiltered,filtered-via-aux-{filter,ignore,filepath}} + + touches 10-subdir-ignoring-itself/foo {foo,bar} + echo foo >10-subdir-ignoring-itself/foo/.gitignore ); } create-tree "$1"