bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-diffutils] [PATCH] tests: fix an erroneous test


From: Jim Meyering
Subject: [bug-diffutils] [PATCH] tests: fix an erroneous test
Date: Mon, 24 Jan 2011 13:36:54 +0100

This test was failing:

  http://hydra.nixos.org/build/868776

>From bf4003c13d75c927f5f616b2c38eef7c3d7e28c4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 24 Jan 2011 13:36:17 +0100
Subject: [PATCH] tests: fix an erroneous test

On most systems, like-named files were compared, by luck.
However, on others, different-named files would be compared
since their names were being treated as equal -- but they had
different content, so the test would fail.
* tests/colliding-file-names: Use different sets of file names
in d1 and d2 so that they cannot accidentally match.
Put the same line in each test file.  This is required
when files named e.g., abc and ABC are compared.
This test was failing on a NixOS 86_64-darwin system.
---
 tests/colliding-file-names |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/colliding-file-names b/tests/colliding-file-names
index c05401a..964d026 100644
--- a/tests/colliding-file-names
+++ b/tests/colliding-file-names
@@ -6,12 +6,12 @@

 mkdir d1 d2 || fail=1

-for i in abc abC aBc aBC Abc AbC ABc ABC; do
- echo $i >d1/$i || fail=1
+for i in abc abC aBc aBC; do
+ echo xyz >d1/$i || fail=1
 done

-for i in ABC ABc AbC Abc aBC aBc abC abc; do
- echo $i >d2/$i || fail=1
+for i in ABC ABc AbC Abc; do
+ echo xyz >d2/$i || fail=1
 done

 diff -r --ignore-file-name-case d1 d2 || fail=1
--
1.7.3.5.38.gb312b



reply via email to

[Prev in Thread] Current Thread [Next in Thread]