The case statement to check the file mode of a staged file appears
a number of times.
Simplify the test by utilizing a test_mode_in_index helper function.
Signed-off-by: Ingo Brückl
---
t/t3700-add.sh | 54 ++
1 file changed, 22 insertions
missions on the same file.
Signed-off-by: Ingo Brückl
---
t/t3700-add.sh | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 494f5b8..1fa5dfd 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -332,24 +332,18 @@ test_expect_s
the modes of xfoo1 as this test expects.
Fix this by starting the test with "rm -f xfoo1" to make
sure the file is created from scratch, and do the same to
other similar tests.
Signed-off-by: Ingo Brückl
---
t/t3700-add.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/t/t370
The files to be tested may already exist and be links which will make
the test fail. So ensure that we are working in a clean environment.
Signed-off-by: Ingo Brückl
---
t/t3700-add.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 4865304..494f5b8
Don't rely on chmod to work on the underlying platform (although it
wouldn't harm the result of the '--chmod=-x' test). Directly check the
result of the --chmod option.
Add a test_mode_in_index helper function in order to check for success.
Signed-off-by: Ingo Brückl
Utilize the test_mode_in_index helper function.
Signed-off-by: Ingo Brückl
---
t/t3700-add.sh | 30 ++
1 file changed, 6 insertions(+), 24 deletions(-)
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index c08ec9e..0e21a52 100755
--- a/t/t3700-add.sh
+++ b/t/t3700
At the time of the test xfoo1 already exists and is a link.
As a result, the check for file mode 100644 fails.
Create not yet existing file xfoo instead.
Signed-off-by: Ingo Brückl
---
t/t3700-add.sh | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/t/t3700
7 matches
Mail list logo