tests/test-debugextensions.t
changeset 29891 ca6940515485
parent 29703 3ef9aa7ad1fc
child 29892 b64eaf947632
equal deleted inserted replaced
29890:31a6d5e14508 29891:ca6940515485
     1   $ hg debugextensions
     1   $ hg debugextensions
     2 
     2 
     3   $ debugpath=`pwd`/extwithoutinfos.py
     3   $ debugpath=`pwd`/extwithoutinfos.py
     4 
     4 
     5   $ cat > extwithoutinfos.py <<EOF
     5   $ cat > extwithoutinfos.py <<EOF
       
     6   > EOF
       
     7   $ cat > extwithinfos.py <<EOF
       
     8   > testedwith = '3.0 3.1 3.2.1'
       
     9   > buglink = 'https://example.org/bts'
     6   > EOF
    10   > EOF
     7 
    11 
     8   $ cat >> $HGRCPATH <<EOF
    12   $ cat >> $HGRCPATH <<EOF
     9   > [extensions]
    13   > [extensions]
    10   > color=
    14   > color=
    11   > histedit=
    15   > histedit=
    12   > patchbomb=
    16   > patchbomb=
    13   > rebase=
    17   > rebase=
    14   > mq=
    18   > mq=
    15   > ext1 = $debugpath
    19   > ext1 = $debugpath
       
    20   > ext2 = `pwd`/extwithinfos.py
    16   > EOF
    21   > EOF
    17 
    22 
    18   $ hg debugextensions
    23   $ hg debugextensions
    19   color
    24   color
    20   ext1 (untested!)
    25   ext1 (untested!)
       
    26   ext2 (3.2.1!)
    21   histedit
    27   histedit
    22   mq
    28   mq
    23   patchbomb
    29   patchbomb
    24   rebase
    30   rebase
    25 
    31 
    27   color
    33   color
    28     location: */hgext/color.py* (glob)
    34     location: */hgext/color.py* (glob)
    29     tested with: internal
    35     tested with: internal
    30   ext1
    36   ext1
    31     location: */extwithoutinfos.py* (glob)
    37     location: */extwithoutinfos.py* (glob)
       
    38   ext2
       
    39     location: */extwithinfos.py* (glob)
       
    40     tested with: 3.0 3.1 3.2.1
       
    41     bug reporting: https://example.org/bts
    32   histedit
    42   histedit
    33     location: */hgext/histedit.py* (glob)
    43     location: */hgext/histedit.py* (glob)
    34     tested with: internal
    44     tested with: internal
    35   mq
    45   mq
    36     location: */hgext/mq.py* (glob)
    46     location: */hgext/mq.py* (glob)
    55     "name": "ext1",
    65     "name": "ext1",
    56     "source": "*/extwithoutinfos.py*", (glob)
    66     "source": "*/extwithoutinfos.py*", (glob)
    57     "testedwith": []
    67     "testedwith": []
    58    },
    68    },
    59    {
    69    {
       
    70     "buglink": "https://example.org/bts",
       
    71     "name": "ext2",
       
    72     "source": "*/extwithinfos.py*", (glob)
       
    73     "testedwith": ["3.0", "3.1", "3.2.1"]
       
    74    },
       
    75    {
    60     "buglink": "",
    76     "buglink": "",
    61     "name": "histedit",
    77     "name": "histedit",
    62     "source": "*/hgext/histedit.py*", (glob)
    78     "source": "*/hgext/histedit.py*", (glob)
    63     "testedwith": ["internal"]
    79     "testedwith": ["internal"]
    64    },
    80    },
    80     "source": "*/hgext/rebase.py*", (glob)
    96     "source": "*/hgext/rebase.py*", (glob)
    81     "testedwith": ["internal"]
    97     "testedwith": ["internal"]
    82    }
    98    }
    83   ]
    99   ]
    84 
   100 
    85   $ hg debugextensions -T '{ifcontains("internal", testedwith, "", "{name}\n")}'
   101   $ hg debugextensions -T '{ifcontains("3.1", testedwith, "{name}\n")}'
    86   ext1
   102   ext2
       
   103   $ hg debugextensions \
       
   104   > -T '{ifcontains("3.2", testedwith, "no substring match: {name}\n")}'