annotate tests/test-hghave.t @ 28573:6a42564081cb

shelve: adds restoring newly created branch (issue5048) (BC) Before this patch shelve never preserved branch information, so after applying unshelve branch was the same as it was on working copy no matter in which branch shelve took place. This patch makes bare shelving(with no files specified, without interactive,include and exclude option) remembers information if the working directory was on newly created branch ,in other words working directory was on different branch than its first parent. In this situation unshelving restores branch information to the working directory.
author liscju <piotr.listkiewicz@gmail.com>
date Wed, 10 Feb 2016 02:23:27 +0100
parents 342ab95a1f4b
children 5af78c524f34
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12430
60738066e37a tests: unify test-hghave
Matt Mackall <mpm@selenic.com>
parents: 8059
diff changeset
1 Testing that hghave does not crash when checking features
8059
41a2c5cbcb6a hghave: checking that all targets are Exception-free
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff changeset
2
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 12430
diff changeset
3 $ hghave --test-features 2>/dev/null
25732
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
4
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
5 Testing hghave extensibility for third party tools
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
6
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
7 $ cat > hghaveaddon.py <<EOF
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
8 > import hghave
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
9 > @hghave.check("custom", "custom hghave feature")
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
10 > def has_custom():
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
11 > return True
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
12 > EOF
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
13
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
14 (invocation via run-tests.py)
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
15
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
16 $ cat > test-hghaveaddon.t <<EOF
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
17 > #require custom
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
18 > $ echo foo
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
19 > foo
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
20 > EOF
26158
342ab95a1f4b run-tests: use $HGTEST_RUN_TESTS_PURE
timeless@mozdev.org
parents: 25732
diff changeset
21 $ run-tests.py $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t
25732
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
22 .
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
23 # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
24
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
25 (invocation via command line)
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
26
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
27 $ unset TESTDIR
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
28 $ hghave custom
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
29
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
30 (terminate with exit code 2 at failure of importing hghaveaddon.py)
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
31
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
32 $ rm hghaveaddon.*
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
33 $ cat > hghaveaddon.py <<EOF
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
34 > importing this file should cause syntax error
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
35 > EOF
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
36
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
37 $ hghave custom
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
38 failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1)
b94df10cc3b5 hghave: allow adding customized features at runtime
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25472
diff changeset
39 [2]