Test issue 562: .hgignore requires newline at end
authorPatrick Mezard <pmezard@gmail.com>
Sat, 19 May 2007 22:46:59 +0200
changeset 4439 4e521a3ee5eb
parent 4429 3b0f73edee57
child 4440 2d32e3ae01a7
Test issue 562: .hgignore requires newline at end
tests/test-hgignore
tests/test-hgignore.out
--- a/tests/test-hgignore	Tue May 08 11:54:39 2007 -0700
+++ b/tests/test-hgignore	Sat May 19 22:46:59 2007 +0200
@@ -1,6 +1,25 @@
 #!/bin/sh
 
 hg init
+
+# Test issue 562: .hgignore requires newline at end
+touch foo
+touch bar
+touch baz
+cat > makeignore.py <<EOF
+f = open(".hgignore", "w")
+f.write("ignore\n")
+f.write("foo\n")
+# No EOL here
+f.write("bar")
+f.close()
+EOF
+
+python makeignore.py
+echo % should display baz only
+hg status
+rm foo bar baz .hgignore makeignore.py
+
 touch a.o
 touch a.c
 touch syntax
--- a/tests/test-hgignore.out	Tue May 08 11:54:39 2007 -0700
+++ b/tests/test-hgignore.out	Sat May 19 22:46:59 2007 +0200
@@ -1,3 +1,5 @@
+% should display baz only
+? baz
 --
 A dir/b.o
 ? a.c