tests/test-grep.t
branchstable
changeset 45750 c00595736595
parent 45725 99b8b73eb622
child 45765 ed84a4d48910
equal deleted inserted replaced
45749:f95b16796688 45750:c00595736595
    21   grep: invalid match pattern: nothing to repeat* (glob)
    21   grep: invalid match pattern: nothing to repeat* (glob)
    22   [1]
    22   [1]
    23 
    23 
    24 invalid revset syntax
    24 invalid revset syntax
    25 
    25 
    26   $ hg log -r 'diff()'
    26   $ hg log -r 'diffcontains()'
    27   hg: parse error: diff takes at least 1 argument
    27   hg: parse error: diffcontains takes at least 1 argument
    28   [255]
    28   [255]
    29   $ hg log -r 'diff(:)'
    29   $ hg log -r 'diffcontains(:)'
    30   hg: parse error: diff requires a string pattern
    30   hg: parse error: diffcontains requires a string pattern
    31   [255]
    31   [255]
    32   $ hg log -r 'diff("re:**test**")'
    32   $ hg log -r 'diffcontains("re:**test**")'
    33   hg: parse error: invalid regular expression: nothing to repeat* (glob)
    33   hg: parse error: invalid regular expression: nothing to repeat* (glob)
    34   [255]
    34   [255]
    35 
    35 
    36 simple
    36 simple
    37 
    37 
   565   color:2:-:orange
   565   color:2:-:orange
   566   color:1:+:orange
   566   color:1:+:orange
   567 
   567 
   568 revset predicate for "grep --diff"
   568 revset predicate for "grep --diff"
   569 
   569 
   570   $ hg log -qr 'diff("re:^bl...$")'
   570   $ hg log -qr 'diffcontains("re:^bl...$")'
   571   0:203191eb5e21
   571   0:203191eb5e21
   572   $ hg log -qr 'diff("orange")'
   572   $ hg log -qr 'diffcontains("orange")'
   573   1:7c585a21e0d1
   573   1:7c585a21e0d1
   574   2:11bd8bc8d653
   574   2:11bd8bc8d653
   575   3:e0116d3829f8
   575   3:e0116d3829f8
   576   $ hg log -qr '2:0 & diff("orange")'
   576   $ hg log -qr '2:0 & diffcontains("orange")'
   577   2:11bd8bc8d653
   577   2:11bd8bc8d653
   578   1:7c585a21e0d1
   578   1:7c585a21e0d1
   579 
   579 
   580 test substring match: '^' should only match at the beginning
   580 test substring match: '^' should only match at the beginning
   581 
   581