annotate tests/test-requires.t @ 13026:53391819f195

check-code: catch Python 'is' comparing number or string literals The Python 'is' operator compares object identity, so it should definitely not be applied to string or number literals, which Python implementations are free to represent with a temporary object. This should catch the following kinds of bogus expressions (examples): x is 'foo' x is not 'foo' x is "bar" x is not "bar" x is 42 x is not 42 x is -36 x is not -36 As originally proposed by Martin Geisler, amended with catching negative numbers.
author Adrian Buehlmann <adrian@cadifra.com>
date Sun, 21 Nov 2010 11:52:27 +0100
parents 3b165c127690
children ffb5c09ba822
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12116
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
1 $ mkdir t
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
2 $ cd t
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
3 $ hg init
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
4 $ echo a > a
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
5 $ hg add a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12116
diff changeset
6 $ hg commit -m test
12116
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
7 $ rm .hg/requires
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
8 $ hg tip
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
9 abort: index 00changelog.i unknown format 2!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
10 [255]
12116
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
11 $ echo indoor-pool > .hg/requires
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
12 $ hg tip
f51858009328 tests: unify test-requires
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 3851
diff changeset
13 abort: requirement 'indoor-pool' not supported!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
14 [255]