tests/test-debugextensions.t
author Yuya Nishihara <yuya@tcha.org>
Wed, 31 Aug 2016 23:22:07 +0900
changeset 29892 b64eaf947632
parent 29891 ca6940515485
child 29893 4c28ddda5d48
permissions -rw-r--r--
debugextensions: show ships-with-hg-core state as a separate field This is less magical than rephrasing ships-with-hg-core as internal, and we can distinguish "internal" liar. "tested with: internal" will be hidden by the next patch.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
     1
  $ hg debugextensions
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
     2
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
     3
  $ debugpath=`pwd`/extwithoutinfos.py
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
     4
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
     5
  $ cat > extwithoutinfos.py <<EOF
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
     6
  > EOF
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
     7
  $ cat > extwithinfos.py <<EOF
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
     8
  > testedwith = '3.0 3.1 3.2.1'
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
     9
  > buglink = 'https://example.org/bts'
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    10
  > EOF
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    11
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    12
  $ cat >> $HGRCPATH <<EOF
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    13
  > [extensions]
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    14
  > color=
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    15
  > histedit=
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    16
  > patchbomb=
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    17
  > rebase=
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    18
  > mq=
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    19
  > ext1 = $debugpath
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    20
  > ext2 = `pwd`/extwithinfos.py
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    21
  > EOF
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    22
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    23
  $ hg debugextensions
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    24
  color
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    25
  ext1 (untested!)
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    26
  ext2 (3.2.1!)
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    27
  histedit
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    28
  mq
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    29
  patchbomb
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    30
  rebase
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    31
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    32
  $ hg debugextensions -v
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    33
  color
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    34
    location: */hgext/color.py* (glob)
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    35
    bundled: yes
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    36
    tested with: internal
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    37
  ext1
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    38
    location: */extwithoutinfos.py* (glob)
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    39
    bundled: no
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    40
  ext2
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    41
    location: */extwithinfos.py* (glob)
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    42
    bundled: no
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    43
    tested with: 3.0 3.1 3.2.1
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    44
    bug reporting: https://example.org/bts
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    45
  histedit
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    46
    location: */hgext/histedit.py* (glob)
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    47
    bundled: yes
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    48
    tested with: internal
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    49
  mq
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    50
    location: */hgext/mq.py* (glob)
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    51
    bundled: yes
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    52
    tested with: internal
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    53
  patchbomb
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    54
    location: */hgext/patchbomb.py* (glob)
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    55
    bundled: yes
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    56
    tested with: internal
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    57
  rebase
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    58
    location: */hgext/rebase.py* (glob)
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    59
    bundled: yes
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    60
    tested with: internal
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    61
26430
1f8208a7277e test-debugextensions: sanitize JSON output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 26351
diff changeset
    62
  $ hg debugextensions -Tjson | sed 's|\\\\|/|g'
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    63
  [
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    64
   {
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    65
    "buglink": "",
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    66
    "bundled": true,
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    67
    "name": "color",
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    68
    "source": "*/hgext/color.py*", (glob)
29703
3ef9aa7ad1fc debugextension: change "testedwith" to a list (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 28615
diff changeset
    69
    "testedwith": ["internal"]
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    70
   },
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    71
   {
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    72
    "buglink": "",
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    73
    "bundled": false,
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    74
    "name": "ext1",
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    75
    "source": "*/extwithoutinfos.py*", (glob)
29703
3ef9aa7ad1fc debugextension: change "testedwith" to a list (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 28615
diff changeset
    76
    "testedwith": []
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    77
   },
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    78
   {
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    79
    "buglink": "https://example.org/bts",
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    80
    "bundled": false,
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    81
    "name": "ext2",
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    82
    "source": "*/extwithinfos.py*", (glob)
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    83
    "testedwith": ["3.0", "3.1", "3.2.1"]
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    84
   },
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
    85
   {
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    86
    "buglink": "",
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    87
    "bundled": true,
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    88
    "name": "histedit",
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    89
    "source": "*/hgext/histedit.py*", (glob)
29703
3ef9aa7ad1fc debugextension: change "testedwith" to a list (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 28615
diff changeset
    90
    "testedwith": ["internal"]
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    91
   },
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    92
   {
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    93
    "buglink": "",
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
    94
    "bundled": true,
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    95
    "name": "mq",
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
    96
    "source": "*/hgext/mq.py*", (glob)
29703
3ef9aa7ad1fc debugextension: change "testedwith" to a list (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 28615
diff changeset
    97
    "testedwith": ["internal"]
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    98
   },
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
    99
   {
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   100
    "buglink": "",
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
   101
    "bundled": true,
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   102
    "name": "patchbomb",
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
   103
    "source": "*/hgext/patchbomb.py*", (glob)
29703
3ef9aa7ad1fc debugextension: change "testedwith" to a list (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 28615
diff changeset
   104
    "testedwith": ["internal"]
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   105
   },
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   106
   {
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   107
    "buglink": "",
29892
b64eaf947632 debugextensions: show ships-with-hg-core state as a separate field
Yuya Nishihara <yuya@tcha.org>
parents: 29891
diff changeset
   108
    "bundled": true,
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   109
    "name": "rebase",
28615
a6573503342d test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents: 26430
diff changeset
   110
    "source": "*/hgext/rebase.py*", (glob)
29703
3ef9aa7ad1fc debugextension: change "testedwith" to a list (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 28615
diff changeset
   111
    "testedwith": ["internal"]
26351
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   112
   }
8c7d8d5e1e0f mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff changeset
   113
  ]
29703
3ef9aa7ad1fc debugextension: change "testedwith" to a list (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 28615
diff changeset
   114
29891
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
   115
  $ hg debugextensions -T '{ifcontains("3.1", testedwith, "{name}\n")}'
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
   116
  ext2
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
   117
  $ hg debugextensions \
ca6940515485 test-debugextensions: add dummy extension to make ifcontains() test more solid
Yuya Nishihara <yuya@tcha.org>
parents: 29703
diff changeset
   118
  > -T '{ifcontains("3.2", testedwith, "no substring match: {name}\n")}'