mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
Replace egrep with grep -E
egrep: warning: egrep is obsolescent; using grep -E
This commit is contained in:
parent
39b298aa38
commit
2ad7a823dd
2 changed files with 4 additions and 4 deletions
|
@ -131,5 +131,5 @@ done
|
|||
|
||||
header 'Summary'
|
||||
cat $summary
|
||||
egrep '\bFAIL' $summary &> /dev/null
|
||||
grep -E '\bFAIL' $summary &> /dev/null
|
||||
[[ $? -eq 0 ]] && exit 1 || exit 0
|
||||
|
|
|
@ -97,17 +97,17 @@ class UglyHackishTest(TitoUnitTestFixture):
|
|||
def test_exceptions_3(self):
|
||||
# detect 'except rpm.error, e:'
|
||||
regex = "'^[[:space:]]*except [^,]+,[[:space:]]*[[:alpha:]]+:'"
|
||||
cmd = "find . -type f -regex '.*\.py$' -exec egrep %s {} + | wc -l" % regex
|
||||
cmd = "find . -type f -regex '.*\.py$' -exec grep -E %s {} + | wc -l" % regex
|
||||
result = int(getoutput(cmd))
|
||||
self.assertEqual(result, 0, "Found except clause not supported in Python 3")
|
||||
|
||||
def test_import_commands(self):
|
||||
cmd = "find . -type f -regex '.*\.py$' -exec egrep '^(import|from) commands\.' {} + | grep -v 'compat\.py' | wc -l"
|
||||
cmd = "find . -type f -regex '.*\.py$' -exec grep -E '^(import|from) commands\.' {} + | grep -v 'compat\.py' | wc -l"
|
||||
result = int(getoutput(cmd))
|
||||
self.assertEqual(result, 0, "Found commands module (not supported in Python 3)")
|
||||
|
||||
def test_use_commands(self):
|
||||
cmd = "find . -type f -regex '.*\.py$' -exec egrep 'commands\.' {} + | grep -v 'compat\.py' | wc -l"
|
||||
cmd = "find . -type f -regex '.*\.py$' -exec grep -E 'commands\.' {} + | grep -v 'compat\.py' | wc -l"
|
||||
result = int(getoutput(cmd))
|
||||
self.assertEqual(result, 0, "Found commands module (not supported in Python 3)")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue