changeset 12301:3a082866422a

tests: unify test-username-newline
author Adrian Buehlmann <adrian@cadifra.com>
date Tue, 14 Sep 2010 16:52:32 +0200
parents ca31b0b2ac16
children 6ad36bca3a8a
files tests/test-username-newline tests/test-username-newline.out tests/test-username-newline.t
diffstat 3 files changed, 24 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-username-newline	Tue Sep 14 16:42:02 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-
-hg init foo
-cd foo
-touch a
-
-
-unset HGUSER
-echo "[ui]" >> .hg/hgrc
-echo "username= foo" >> .hg/hgrc
-echo "          bar1" >> .hg/hgrc
-
-hg ci -Am m
-
-rm .hg/hgrc
-
-HGUSER=`(echo foo; echo bar2)` hg ci -Am m
-
-hg ci -Am m -u "`(echo foo; echo bar3)`"
-
-true
--- a/tests/test-username-newline.out	Tue Sep 14 16:42:02 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-adding a
-abort: username 'foo\nbar1' contains a newline
-
-abort: username 'foo\nbar2' contains a newline
-
-transaction abort!
-rollback completed
-abort: username 'foo\nbar3' contains a newline!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-username-newline.t	Tue Sep 14 16:52:32 2010 +0200
@@ -0,0 +1,24 @@
+  $ hg init
+  $ touch a
+
+  $ unset HGUSER
+  $ echo "[ui]" >> .hg/hgrc
+  $ echo "username= foo" >> .hg/hgrc
+  $ echo "          bar1" >> .hg/hgrc
+
+  $ hg ci -Am m
+  adding a
+  abort: username 'foo\nbar1' contains a newline
+  
+  $ rm .hg/hgrc
+
+  $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
+  abort: username 'foo\nbar2' contains a newline
+  
+  $ hg ci -Am m -u "`(echo foo; echo bar3)`"
+  transaction abort!
+  rollback completed
+  abort: username 'foo\nbar3' contains a newline!
+
+  $ true
+