tests/test-revset.t
changeset 28015 a036e1ae1fbe
parent 27991 5daf1a8c5f1d
parent 27987 b19d8d5d6b51
child 28217 d2ac8b57a75d
equal deleted inserted replaced
28014:83fc0c055664 28015:a036e1ae1fbe
  1166 test ',' in `_list`
  1166 test ',' in `_list`
  1167   $ log '0,1'
  1167   $ log '0,1'
  1168   hg: parse error: can't use a list in this context
  1168   hg: parse error: can't use a list in this context
  1169   (see hg help "revsets.x or y")
  1169   (see hg help "revsets.x or y")
  1170   [255]
  1170   [255]
       
  1171   $ try '0,1,2'
       
  1172   (list
       
  1173     ('symbol', '0')
       
  1174     ('symbol', '1')
       
  1175     ('symbol', '2'))
       
  1176   hg: parse error: can't use a list in this context
       
  1177   (see hg help "revsets.x or y")
       
  1178   [255]
  1171 
  1179 
  1172 test that chained `or` operations make balanced addsets
  1180 test that chained `or` operations make balanced addsets
  1173 
  1181 
  1174   $ try '0:1|1:2|2:3|3:4|4:5'
  1182   $ try '0:1|1:2|2:3|3:4|4:5'
  1175   (or
  1183   (or
  1715   $ echo 'chainedorops($1, $2, $3) = $1|$2|$3' >> .hg/hgrc
  1723   $ echo 'chainedorops($1, $2, $3) = $1|$2|$3' >> .hg/hgrc
  1716   $ try 'chainedorops(0:1, 1:2, 2:3)'
  1724   $ try 'chainedorops(0:1, 1:2, 2:3)'
  1717   (func
  1725   (func
  1718     ('symbol', 'chainedorops')
  1726     ('symbol', 'chainedorops')
  1719     (list
  1727     (list
  1720       (list
  1728       (range
  1721         (range
  1729         ('symbol', '0')
  1722           ('symbol', '0')
  1730         ('symbol', '1'))
  1723           ('symbol', '1'))
  1731       (range
  1724         (range
  1732         ('symbol', '1')
  1725           ('symbol', '1')
  1733         ('symbol', '2'))
  1726           ('symbol', '2')))
       
  1727       (range
  1734       (range
  1728         ('symbol', '2')
  1735         ('symbol', '2')
  1729         ('symbol', '3'))))
  1736         ('symbol', '3'))))
  1730   (or
  1737   (or
  1731     (range
  1738     (range
  1875   [255]
  1882   [255]
  1876   $ try 'rs(2, data, 7)'
  1883   $ try 'rs(2, data, 7)'
  1877   (func
  1884   (func
  1878     ('symbol', 'rs')
  1885     ('symbol', 'rs')
  1879     (list
  1886     (list
  1880       (list
  1887       ('symbol', '2')
  1881         ('symbol', '2')
  1888       ('symbol', 'data')
  1882         ('symbol', 'data'))
       
  1883       ('symbol', '7')))
  1889       ('symbol', '7')))
  1884   hg: parse error: invalid number of arguments: 3
  1890   hg: parse error: invalid number of arguments: 3
  1885   [255]
  1891   [255]
  1886   $ try 'rs4(2 or 3, x, x, date)'
  1892   $ try 'rs4(2 or 3, x, x, date)'
  1887   (func
  1893   (func
  1888     ('symbol', 'rs4')
  1894     ('symbol', 'rs4')
  1889     (list
  1895     (list
  1890       (list
  1896       (or
  1891         (list
  1897         ('symbol', '2')
  1892           (or
  1898         ('symbol', '3'))
  1893             ('symbol', '2')
  1899       ('symbol', 'x')
  1894             ('symbol', '3'))
  1900       ('symbol', 'x')
  1895           ('symbol', 'x'))
       
  1896         ('symbol', 'x'))
       
  1897       ('symbol', 'date')))
  1901       ('symbol', 'date')))
  1898   (func
  1902   (func
  1899     ('symbol', 'reverse')
  1903     ('symbol', 'reverse')
  1900     (func
  1904     (func
  1901       ('symbol', 'sort')
  1905       ('symbol', 'sort')
  2053   $ echo 'cat4($1, $2, $3, $4) = $1 ## $2 ## $3 ## $4' >> .hg/hgrc
  2057   $ echo 'cat4($1, $2, $3, $4) = $1 ## $2 ## $3 ## $4' >> .hg/hgrc
  2054   $ try "cat4(278, '5f5', 1ee, 'ce5')"
  2058   $ try "cat4(278, '5f5', 1ee, 'ce5')"
  2055   (func
  2059   (func
  2056     ('symbol', 'cat4')
  2060     ('symbol', 'cat4')
  2057     (list
  2061     (list
  2058       (list
  2062       ('symbol', '278')
  2059         (list
  2063       ('string', '5f5')
  2060           ('symbol', '278')
  2064       ('symbol', '1ee')
  2061           ('string', '5f5'))
       
  2062         ('symbol', '1ee'))
       
  2063       ('string', 'ce5')))
  2065       ('string', 'ce5')))
  2064   (_concat
  2066   (_concat
  2065     (_concat
  2067     (_concat
  2066       (_concat
  2068       (_concat
  2067         ('symbol', '278')
  2069         ('symbol', '278')