annotate tests/test-username-newline.t @ 21754:7e14d026c4c4

run-tests: fixes the '--interactive' option error This patch fixes a regression recently introduced by a refactoring. Previously when failure occurs while testing with '--interactive' was enable, it didn't prompt user by asking whether he wants to accept this failure changes or not. This was happening beacuse of the 'if' condition if ret or not self._options.interactive or \ not os.path.exists(test.errpath): Everytime failure occurs, this condition gets true and returns back even when '--interactive' is enabled. This condition don't led the function to execute further, which consist the '--interactive' functionality. Now, on failure with '--interactive' enabled, it prompts user whether he wants to accepts failure changes or not. If yes then test gets passed and returns true, else test gets failed. On every failure, results gets stored in "self.failures.append((test, reason))" But if failure changes accepted by user then test must get "pop out" from failed test list.
author anuraggoel <anurag.dsps@gmail.com>
date Fri, 13 Jun 2014 14:45:23 +0530
parents 3b165c127690
children 5ac845ca059a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
1 $ hg init
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
2 $ touch a
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
3
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
4 $ unset HGUSER
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
5 $ echo "[ui]" >> .hg/hgrc
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
6 $ echo "username= foo" >> .hg/hgrc
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
7 $ echo " bar1" >> .hg/hgrc
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
8
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
9 $ hg ci -Am m
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
10 adding a
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
11 abort: username 'foo\nbar1' contains a newline
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
12
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12301
diff changeset
13 [255]
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
14 $ rm .hg/hgrc
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
15
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
16 $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
17 abort: username 'foo\nbar2' contains a newline
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
18
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12301
diff changeset
19 [255]
12301
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
20 $ hg ci -Am m -u "`(echo foo; echo bar3)`"
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
21 transaction abort!
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
22 rollback completed
3a082866422a tests: unify test-username-newline
Adrian Buehlmann <adrian@cadifra.com>
parents: 7035
diff changeset
23 abort: username 'foo\nbar3' contains a newline!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12301
diff changeset
24 [255]
7035
9d023ef7b467 forbid username with '\n' at the changelog level
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
25