[PATCH 01 of 14] tests: roll test-committer.t into test-commit.t
Adrian Buehlmann
adrian at cadifra.com
Fri Jun 8 13:18:41 UTC 2012
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1339161065 -7200
# Node ID d62774e5fdbcf4dd9a170c2ee2efb4dbbc4d7ffc
# Parent 35292e67674593ae5a32572eaf7916ab3b09bcda
tests: roll test-committer.t into test-commit.t
diff --git a/tests/test-commit.t b/tests/test-commit.t
--- a/tests/test-commit.t
+++ b/tests/test-commit.t
@@ -106,7 +106,8 @@
[255]
$ cd ..
-
+ $ pwd
+ $TESTTMP
partial subdir commit test
@@ -168,6 +169,8 @@
$ cd ..
+ $ pwd
+ $TESTTMP
dot and subdir commit test
@@ -219,10 +222,11 @@
$ cd ..
$ cd ..
+ $ pwd
+ $TESTTMP
Issue1049: Hg permits partial commit of merge without warning
- $ cd ..
$ hg init issue1049
$ cd issue1049
$ echo a > a
@@ -256,7 +260,8 @@
$ hg ci -mmerge
$ cd ..
-
+ $ pwd
+ $TESTTMP
test commit message content
@@ -304,3 +309,74 @@
rev offset length base linkrev nodeid p1 p2
0 0 6 0 0 26d3ca0dfd18 000000000000 000000000000
1 6 7 1 1 d267bddd54f7 26d3ca0dfd18 000000000000
+
+ $ cd ..
+ $ pwd
+ $TESTTMP
+
+
+committer tests
+
+ $ unset HGUSER
+ $ EMAIL="My Name <myname at example.com>"
+ $ export EMAIL
+
+ $ hg init committer
+ $ cd committer
+ $ touch asdf
+ $ hg add asdf
+ $ hg commit -m commit-1
+ $ hg tip
+ changeset: 0:53f268a58230
+ tag: tip
+ user: My Name <myname at example.com>
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: commit-1
+
+
+ $ unset EMAIL
+ $ echo 1234 > asdf
+ $ hg commit -u "foo at bar.com" -m commit-1
+ $ hg tip
+ changeset: 1:3871b2a9e9bf
+ tag: tip
+ user: foo at bar.com
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: commit-1
+
+ $ echo "[ui]" >> .hg/hgrc
+ $ echo "username = foobar <foo at bar.com>" >> .hg/hgrc
+ $ echo 12 > asdf
+ $ hg commit -m commit-1
+ $ hg tip
+ changeset: 2:8eeac6695c1c
+ tag: tip
+ user: foobar <foo at bar.com>
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: commit-1
+
+ $ echo 1 > asdf
+ $ hg commit -u "foo at bar.com" -m commit-1
+ $ hg tip
+ changeset: 3:957606a725e4
+ tag: tip
+ user: foo at bar.com
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: commit-1
+
+ $ echo 123 > asdf
+ $ echo "[ui]" > .hg/hgrc
+ $ echo "username = " >> .hg/hgrc
+ $ hg commit -m commit-1
+ abort: no username supplied (see "hg help config")
+ [255]
+ $ rm .hg/hgrc
+ $ hg commit -m commit-1 2>&1
+ No username found, using '[^']*' instead (re)
+
+ $ echo space > asdf
+ $ hg commit -u ' ' -m commit-1
+ transaction abort!
+ rollback completed
+ abort: empty username!
+ [255]
diff --git a/tests/test-committer.t b/tests/test-committer.t
deleted file mode 100644
--- a/tests/test-committer.t
+++ /dev/null
@@ -1,63 +0,0 @@
- $ unset HGUSER
- $ EMAIL="My Name <myname at example.com>"
- $ export EMAIL
-
- $ hg init test
- $ cd test
- $ touch asdf
- $ hg add asdf
- $ hg commit -m commit-1
- $ hg tip
- changeset: 0:53f268a58230
- tag: tip
- user: My Name <myname at example.com>
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: commit-1
-
-
- $ unset EMAIL
- $ echo 1234 > asdf
- $ hg commit -u "foo at bar.com" -m commit-1
- $ hg tip
- changeset: 1:3871b2a9e9bf
- tag: tip
- user: foo at bar.com
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: commit-1
-
- $ echo "[ui]" >> .hg/hgrc
- $ echo "username = foobar <foo at bar.com>" >> .hg/hgrc
- $ echo 12 > asdf
- $ hg commit -m commit-1
- $ hg tip
- changeset: 2:8eeac6695c1c
- tag: tip
- user: foobar <foo at bar.com>
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: commit-1
-
- $ echo 1 > asdf
- $ hg commit -u "foo at bar.com" -m commit-1
- $ hg tip
- changeset: 3:957606a725e4
- tag: tip
- user: foo at bar.com
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: commit-1
-
- $ echo 123 > asdf
- $ echo "[ui]" > .hg/hgrc
- $ echo "username = " >> .hg/hgrc
- $ hg commit -m commit-1
- abort: no username supplied (see "hg help config")
- [255]
- $ rm .hg/hgrc
- $ hg commit -m commit-1 2>&1
- No username found, using '[^']*' instead (re)
-
- $ echo space > asdf
- $ hg commit -u ' ' -m commit-1
- transaction abort!
- rollback completed
- abort: empty username!
- [255]
More information about the Mercurial-devel
mailing list