Mercurial > hg
annotate tests/test-audit-path @ 10546:3a69afd6987e stable
fix test output changed by 2e1a9b811d13
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Thu, 25 Feb 2010 14:35:21 +0100 |
parents | c6f3ff294fe0 |
children |
rev | line source |
---|---|
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 #!/bin/sh |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 hg init |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 echo % should fail |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 hg add .hg/00changelog.i |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 mkdir a |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 echo a > a/a |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 hg ci -Ama |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
11 ln -s a b |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
12 echo b > a/b |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
14 echo % should fail |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
15 hg add b/b |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
16 |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
17 echo % should succeed |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
18 hg add b |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
19 |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
20 echo % should still fail - maybe |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
21 hg add b/b |
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
22 |
7554
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
23 echo % unbundle tampered bundle |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
24 hg init target |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
25 cd target |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
26 hg unbundle $TESTDIR/tampered.hg |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
27 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
28 echo % attack .hg/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
29 hg manifest -r0 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
30 hg update -Cr0 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
31 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
32 echo % attack foo/.hg/test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
33 hg manifest -r1 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
34 hg update -Cr1 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
35 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
36 echo % attack back/test where back symlinks to .. |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
37 hg manifest -r2 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
38 hg update -Cr2 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
39 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
40 echo % attack ../test |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
41 hg manifest -r3 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
42 hg update -Cr3 |
11a4eb81fb4f
test-audit-path: add more tests (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
5158
diff
changeset
|
43 |
7586
e9d3a11eacad
test-audit-path: add one more test (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7554
diff
changeset
|
44 echo % attack /tmp/test |
e9d3a11eacad
test-audit-path: add one more test (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7554
diff
changeset
|
45 hg manifest -r4 |
7681
c6f3ff294fe0
tests: fix issue in test-audit-path with HGTMP on OS X
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7586
diff
changeset
|
46 hg update -Cr4 2>&1 | sed -e "s|/.*/test-audit-path|[HGTMP]/test-audit-path|" |
7586
e9d3a11eacad
test-audit-path: add one more test (issue 1450)
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
7554
diff
changeset
|
47 |
5158
d316124ebbea
Make audit_path more stringent.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
48 exit 0 |