tests/test-revset.t
changeset 28427 969a4615c4c4
parent 28426 3d39ac06af9a
child 28629 d6f8a1535224
equal deleted inserted replaced
28426:3d39ac06af9a 28427:969a4615c4c4
  1725     ('symbol', 'max')
  1725     ('symbol', 'max')
  1726     (range
  1726     (range
  1727       ('symbol', '2')
  1727       ('symbol', '2')
  1728       ('symbol', '5')))
  1728       ('symbol', '5')))
  1729   * set:
  1729   * set:
  1730   <baseset [5]>
  1730   <baseset
       
  1731     <max
       
  1732       <fullreposet+ 0:9>,
       
  1733       <spanset+ 2:5>>>
  1731   5
  1734   5
  1732 
  1735 
  1733 test chained `or` operations are flattened at parsing phase
  1736 test chained `or` operations are flattened at parsing phase
  1734 
  1737 
  1735   $ echo 'chainedorops($1, $2, $3) = $1|$2|$3' >> .hg/hgrc
  1738   $ echo 'chainedorops($1, $2, $3) = $1|$2|$3' >> .hg/hgrc
  2003         <fullreposet+ 0:9>,
  2006         <fullreposet+ 0:9>,
  2004         <baseset [1, 2, 3]>>>,
  2007         <baseset [1, 2, 3]>>>,
  2005     <not
  2008     <not
  2006       <baseset [2]>>>
  2009       <baseset [2]>>>
  2007   1
  2010   1
  2008   $ log 'max(1 or 2) and not 2'
  2011   $ try 'max(1 or 2) and not 2'
  2009   $ log 'min(1 or 2) and not 1'
  2012   (and
       
  2013     (func
       
  2014       ('symbol', 'max')
       
  2015       (or
       
  2016         ('symbol', '1')
       
  2017         ('symbol', '2')))
       
  2018     (not
       
  2019       ('symbol', '2')))
       
  2020   * set:
       
  2021   <filteredset
       
  2022     <baseset
       
  2023       <max
       
  2024         <fullreposet+ 0:9>,
       
  2025         <baseset [1, 2]>>>,
       
  2026     <not
       
  2027       <baseset [2]>>>
       
  2028   $ try 'min(1 or 2) and not 1'
       
  2029   (and
       
  2030     (func
       
  2031       ('symbol', 'min')
       
  2032       (or
       
  2033         ('symbol', '1')
       
  2034         ('symbol', '2')))
       
  2035     (not
       
  2036       ('symbol', '1')))
       
  2037   * set:
       
  2038   <filteredset
       
  2039     <baseset
       
  2040       <min
       
  2041         <fullreposet+ 0:9>,
       
  2042         <baseset [1, 2]>>>,
       
  2043     <not
       
  2044       <baseset [1]>>>
  2010   $ try 'last(1 or 2, 1) and not 2'
  2045   $ try 'last(1 or 2, 1) and not 2'
  2011   (and
  2046   (and
  2012     (func
  2047     (func
  2013       ('symbol', 'last')
  2048       ('symbol', 'last')
  2014       (list
  2049       (list