comparison tests/test-bad-extension.t @ 28338:9974b8236cac

tests: Solaris grep doesn't add a trailing newline when it's missing The bad-extension tests emits a list of not-loaded extensions, and pipes that output through grep. On Solaris, the test-output gets "(no-eol)" appended because although the message has no trailing newline, GNU grep adds it. If we simply add the newline to the message, the problem goes away for both versions of grep.
author Danek Duvall <danek.duvall@oracle.com>
date Wed, 02 Mar 2016 15:01:41 -0800
parents 7f430b2ac7fd
children 4b81487a01d4
comparison
equal deleted inserted replaced
28337:869e65e68aee 28338:9974b8236cac
37 > from mercurial import cmdutil, commands, extensions 37 > from mercurial import cmdutil, commands, extensions
38 > cmdtable = {} 38 > cmdtable = {}
39 > command = cmdutil.command(cmdtable) 39 > command = cmdutil.command(cmdtable)
40 > @command('showbadexts', norepo=True) 40 > @command('showbadexts', norepo=True)
41 > def showbadexts(ui, *pats, **opts): 41 > def showbadexts(ui, *pats, **opts):
42 > ui.write('BADEXTS: %s' % ' '.join(sorted(extensions.notloaded()))) 42 > ui.write('BADEXTS: %s\n' % ' '.join(sorted(extensions.notloaded())))
43 > EOF 43 > EOF
44 $ hg --config extensions.badexts=showbadexts.py showbadexts 2>&1 | grep '^BADEXTS' 44 $ hg --config extensions.badexts=showbadexts.py showbadexts 2>&1 | grep '^BADEXTS'
45 BADEXTS: badext badext2 45 BADEXTS: badext badext2
46 46
47 show traceback for ImportError of hgext.name if debug is set 47 show traceback for ImportError of hgext.name if debug is set