changeset 12468:d8bf747d2e29

tests: unify test-mq-qrefresh-replace-log-message
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Sep 2010 13:43:21 -0500
parents 05e1171cf4ca
children be6d33671c95
files tests/test-mq-qrefresh-replace-log-message tests/test-mq-qrefresh-replace-log-message.out tests/test-mq-qrefresh-replace-log-message.t
diffstat 3 files changed, 61 insertions(+), 88 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-mq-qrefresh-replace-log-message	Sun Sep 26 13:43:21 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-# Environement setup for MQ
-echo "[extensions]" >> $HGRCPATH
-echo "mq=" >> $HGRCPATH
-
-#Repo init
-hg init
-hg qinit
-
-echo =======================
-echo "Should fail if no patches applied"
-hg qrefresh
-hg qrefresh -e
-
-hg qnew -m "First commit message" first-patch
-echo aaaa > file
-hg add file
-hg qrefresh
-echo =======================
-echo "Should display 'First commit message'"
-hg log -l1 -v | sed -n '/description/,$p'
-echo
-
-# Testing changing message with -m
-echo bbbb > file
-hg qrefresh -m "Second commit message"
-echo =======================
-echo "Should display 'Second commit message'"
-hg log -l1 -v | sed -n '/description/,$p'
-echo
-
-
-# Testing changing message with -l
-echo "Third commit message" > logfile
-echo " This is the 3rd log message" >> logfile
-echo bbbb > file
-hg qrefresh -l logfile
-echo =======================
-printf "Should display 'Third commit message\\\n This is the 3rd log message'\n"
-hg log -l1 -v | sed -n '/description/,$p'
-echo
-
-# Testing changing message with -l-
-hg qnew -m "First commit message" second-patch
-echo aaaa > file2
-hg add file2
-echo bbbb > file2
-(echo "Fifth commit message"
-echo " This is the 5th log message" >> logfile) |\
-hg qrefresh -l-
-echo =======================
-printf "Should display 'Fifth commit message\\\n This is the 5th log message'\n"
-hg log -l1 -v | sed -n '/description/,$p'
-echo
--- a/tests/test-mq-qrefresh-replace-log-message.out	Sun Sep 26 13:43:21 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-=======================
-Should fail if no patches applied
-no patches applied
-no patches applied
-=======================
-Should display 'First commit message'
-description:
-First commit message
-
-
-
-=======================
-Should display 'Second commit message'
-description:
-Second commit message
-
-
-
-=======================
-Should display 'Third commit message\n This is the 3rd log message'
-description:
-Third commit message
- This is the 3rd log message
-
-
-
-=======================
-Should display 'Fifth commit message\n This is the 5th log message'
-description:
-Fifth commit message
-
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-mq-qrefresh-replace-log-message.t	Sun Sep 26 13:43:21 2010 -0500
@@ -0,0 +1,61 @@
+Environement setup for MQ
+
+  $ echo "[extensions]" >> $HGRCPATH
+  $ echo "mq=" >> $HGRCPATH
+  $ hg init
+  $ hg qinit
+
+Should fail if no patches applied
+
+  $ hg qrefresh
+  no patches applied
+  [1]
+  $ hg qrefresh -e
+  no patches applied
+  [1]
+  $ hg qnew -m "First commit message" first-patch
+  $ echo aaaa > file
+  $ hg add file
+  $ hg qrefresh
+
+Should display 'First commit message'
+
+  $ hg log -l1 --template "{desc}\n"
+  First commit message
+
+Testing changing message with -m
+
+  $ echo bbbb > file
+  $ hg qrefresh -m "Second commit message"
+
+Should display 'Second commit message'
+
+  $ hg log -l1 --template "{desc}\n"
+  Second commit message
+
+Testing changing message with -l
+
+  $ echo "Third commit message" > logfile
+  $ echo " This is the 3rd log message" >> logfile
+  $ echo bbbb > file
+  $ hg qrefresh -l logfile
+
+Should display 'Third commit message\\\n This is the 3rd log message'
+
+  $ hg log -l1 --template "{desc}\n"
+  Third commit message
+   This is the 3rd log message
+
+Testing changing message with -l-
+
+  $ hg qnew -m "First commit message" second-patch
+  $ echo aaaa > file2
+  $ hg add file2
+  $ echo bbbb > file2
+  $ (echo "Fifth commit message"; echo " This is the 5th log message") | hg qrefresh -l-
+
+Should display 'Fifth commit message\\\n This is the 5th log message'
+
+  $ hg log -l1 --template "{desc}\n"
+  Fifth commit message
+   This is the 5th log message