/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_grep.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
import os
20
18
import re
21
19
import unicodedata as ud
22
20
 
23
21
from .. import tests, osutils
24
 
from ..sixish import PY3
25
22
from .._termcolor import color_string, FG
26
23
 
27
24
from ..tests.features import (
390
387
 
391
388
        out, err = self.run_bzr(
392
389
            ['grep', '-r', 'last:1', '--null', 'line[1-3]'])
393
 
        if not PY3:
394
 
            out = out.decode('utf-8', 'ignore')
395
390
        nout = ud.normalize(u'NFC', out)
396
391
        self.assertEqual(nout, nref)
397
392
        self.assertEqual(len(out.splitlines()), 1)
398
393
 
399
394
        out, err = self.run_bzr(['grep', '-r', 'last:1', '-Z', 'line[1-3]'])
400
 
        if not PY3:
401
 
            out = out.decode('utf-8', 'ignore')
402
395
        nout = ud.normalize(u'NFC', out)
403
396
        self.assertEqual(nout, nref)
404
397
        self.assertEqual(len(out.splitlines()), 1)
405
398
 
406
399
        out, err = self.run_bzr(['grep', '-r', 'last:1', '--null', 'line'])
407
 
        if not PY3:
408
 
            out = out.decode('utf-8', 'ignore')
409
400
        nout = ud.normalize(u'NFC', out)
410
401
        self.assertEqual(nout, nref)
411
402
        self.assertEqual(len(out.splitlines()), 1)