Adding egrep hook; better iteration for whitespace; improving local tests

This commit is contained in:
2023-01-25 22:31:55 -06:00
parent 133f231726
commit 16c864e161
7 changed files with 24 additions and 14 deletions

View File

@@ -2,7 +2,7 @@ import os
import pytest
def test_hooks_exec():
fh = os.popen("find Hooks -type f -exec ls -l {} \\; | egrep ^-rw-")
fh = os.popen("find Hooks -type f -exec ls -l {} \\; | grep -E ^-rw-")
output = fh.read()
retcode = fh.close()
assert retcode == 256 and output == ''

View File

@@ -2,7 +2,7 @@ import os
import pytest
def test_bash_import():
fh = os.popen("/bin/bash -c 'source Bash/header; [ `declare -F | wc -l` -eq `egrep -c ^function\\ Bash/header` ]'", mode='r', buffering=-1)
fh = os.popen("/bin/bash -c 'source Bash/header; [ `declare -F | wc -l` -eq `grep -E -c ^function\\ Bash/header` ]'", mode='r', buffering=-1)
output = fh.read()
retcode = fh.close()
assert retcode == None