changeset 11858:934c7e91c126

tests: unify test-bad-extension
author Martin Geisler <mg@lazybytes.net>
date Sat, 14 Aug 2010 02:35:44 +0200
parents 9661514f85ae
children f48178034569
files tests/test-bad-extension tests/test-bad-extension.out tests/test-bad-extension.t
diffstat 3 files changed, 15 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bad-extension	Sat Aug 14 02:30:05 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-echo 'raise Exception("bit bucket overflow")' > badext.py
-abspath=`pwd`/badext.py
-
-echo '[extensions]' >> $HGRCPATH
-echo "gpg =" >> $HGRCPATH
-echo "hgext.gpg =" >> $HGRCPATH
-echo "badext = $abspath" >> $HGRCPATH
-echo "badext2 =" >> $HGRCPATH
-
-hg -q help help 2>&1 | python -c \
-  "import sys; sys.stdout.write(sys.stdin.read().replace('$abspath', '.../badext.py'))"
--- a/tests/test-bad-extension.out	Sat Aug 14 02:30:05 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-*** failed to import extension badext from .../badext.py: bit bucket overflow
-*** failed to import extension badext2: No module named badext2
-hg help [TOPIC]
-
-show help for a given topic or a help overview
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-bad-extension.t	Sat Aug 14 02:35:44 2010 +0200
@@ -0,0 +1,15 @@
+  $ echo 'raise Exception("bit bucket overflow")' > badext.py
+  $ abspath=`pwd`/badext.py
+
+  $ echo '[extensions]' >> $HGRCPATH
+  $ echo "gpg =" >> $HGRCPATH
+  $ echo "hgext.gpg =" >> $HGRCPATH
+  $ echo "badext = $abspath" >> $HGRCPATH
+  $ echo "badext2 =" >> $HGRCPATH
+
+  $ hg -q help help
+  \*\*\* failed to import extension badext from .*/badext.py: bit bucket overflow
+  \*\*\* failed to import extension badext2: No module named badext2
+  hg help [TOPIC]
+  
+  show help for a given topic or a help overview