Debian Codegraph @

tests/test-debugextensions.t

raw
1 #if no-extraextensions
2 $ hg debugextensions
3 #endif
4
5 $ debugpath=`pwd`/extwithoutinfos.py
6
7 $ cat > extwithoutinfos.py <<EOF
8 > EOF
9 $ cat > extwithinfos.py <<EOF
10 > testedwith = b'3.0 3.1 3.2.1'
11 > buglink = b'https://example.org/bts'
12 > EOF
13
14 $ cat >> $HGRCPATH <<EOF
15 > [extensions]
16 > histedit=
17 > patchbomb=
18 > rebase=
19 > mq=
20 > ext1 = $debugpath
21 > ext2 = `pwd`/extwithinfos.py
22 > EOF
23
24 $ for extension in $HGTESTEXTRAEXTENSIONS; do
25 > echo "$extension=!" >> $HGRCPATH
26 > done
27
28 $ hg debugextensions
29 ext1 (untested!)
30 ext2 (3.2.1!)
31 histedit
32 mq
33 patchbomb
34 rebase
35
36 $ hg debugextensions -v
37 ext1
38 location: */extwithoutinfos.py* (glob)
39 bundled: no
40 ext2
41 location: */extwithinfos.py* (glob)
42 bundled: no
43 tested with: 3.0 3.1 3.2.1
44 bug reporting: https://example.org/bts
45 histedit
46 location: */hgext/histedit.py* (glob) (no-pyoxidizer-in-memory !)
47 location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
48 bundled: yes
49 mq
50 location: */hgext/mq.py* (glob) (no-pyoxidizer-in-memory !)
51 location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
52 bundled: yes
53 patchbomb
54 location: */hgext/patchbomb.py* (glob) (no-pyoxidizer-in-memory !)
55 location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
56 bundled: yes
57 rebase
58 location: */hgext/rebase.py* (glob) (no-pyoxidizer-in-memory !)
59 location: */release/app/hg* (glob) (pyoxidizer-in-memory !)
60 bundled: yes
61
62 $ hg debugextensions -Tjson | sed 's|\\\\|/|g'
63 [
64 {
65 "buglink": "",
66 "bundled": false,
67 "name": "ext1",
68 "source": "*/extwithoutinfos.py*", (glob)
69 "testedwith": []
70 },
71 {
72 "buglink": "https://example.org/bts",
73 "bundled": false,
74 "name": "ext2",
75 "source": "*/extwithinfos.py*", (glob)
76 "testedwith": ["3.0", "3.1", "3.2.1"]
77 },
78 {
79 "buglink": "",
80 "bundled": true,
81 "name": "histedit",
82 "source": "*/hgext/histedit.py*", (glob) (no-pyoxidizer-in-memory !)
83 "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
84 "testedwith": []
85 },
86 {
87 "buglink": "",
88 "bundled": true,
89 "name": "mq",
90 "source": "*/hgext/mq.py*", (glob) (no-pyoxidizer-in-memory !)
91 "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
92 "testedwith": []
93 },
94 {
95 "buglink": "",
96 "bundled": true,
97 "name": "patchbomb",
98 "source": "*/hgext/patchbomb.py*", (glob) (no-pyoxidizer-in-memory !)
99 "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
100 "testedwith": []
101 },
102 {
103 "buglink": "",
104 "bundled": true,
105 "name": "rebase",
106 "source": "*/hgext/rebase.py*", (glob) (no-pyoxidizer-in-memory !)
107 "source": */release/app/hg* (glob) (pyoxidizer-in-memory !)
108 "testedwith": []
109 }
110 ]
111
112 $ hg debugextensions -T '{ifcontains("3.1", testedwith, "{name}\n")}'
113 ext2
114 $ hg debugextensions \
115 > -T '{ifcontains("3.2", testedwith, "no substring match: {name}\n")}'