/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-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
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
 
17
19
import os
18
20
import re
19
21
import unicodedata as ud
20
22
 
21
23
from .. import tests, osutils
 
24
from ..sixish import PY3
22
25
from .._termcolor import color_string, FG
23
26
 
24
27
from ..tests.features import (
387
390
 
388
391
        out, err = self.run_bzr(
389
392
            ['grep', '-r', 'last:1', '--null', 'line[1-3]'])
 
393
        if not PY3:
 
394
            out = out.decode('utf-8', 'ignore')
390
395
        nout = ud.normalize(u'NFC', out)
391
396
        self.assertEqual(nout, nref)
392
397
        self.assertEqual(len(out.splitlines()), 1)
393
398
 
394
399
        out, err = self.run_bzr(['grep', '-r', 'last:1', '-Z', 'line[1-3]'])
 
400
        if not PY3:
 
401
            out = out.decode('utf-8', 'ignore')
395
402
        nout = ud.normalize(u'NFC', out)
396
403
        self.assertEqual(nout, nref)
397
404
        self.assertEqual(len(out.splitlines()), 1)
398
405
 
399
406
        out, err = self.run_bzr(['grep', '-r', 'last:1', '--null', 'line'])
 
407
        if not PY3:
 
408
            out = out.decode('utf-8', 'ignore')
400
409
        nout = ud.normalize(u'NFC', out)
401
410
        self.assertEqual(nout, nref)
402
411
        self.assertEqual(len(out.splitlines()), 1)