mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-devtest
synced 2026-01-15 18:33:31 +01:00
24 lines
651 B
Python
24 lines
651 B
Python
|
|
#!/usr/bin/python3.8
|
||
|
|
|
||
|
|
from jwutils.misc import multi_regex_edit
|
||
|
|
from jwutils.log import *
|
||
|
|
from devtest.os.test import ListCmd as Base
|
||
|
|
|
||
|
|
class TestCase(Base):
|
||
|
|
|
||
|
|
def _filter(self, output):
|
||
|
|
slog(WARNING, "Running filter")
|
||
|
|
output = multi_regex_edit([
|
||
|
|
('del', 'nonexist'),
|
||
|
|
('sub', '/usr/bin', '/klaut/bin')
|
||
|
|
], output)
|
||
|
|
return output
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
set_level(INFO)
|
||
|
|
refpath = 'ps-ref.txt'
|
||
|
|
testpath = 'ps-out.txt'
|
||
|
|
with open(testpath, "r") as f:
|
||
|
|
lines = f.readlines()
|
||
|
|
features = set(['polp'])
|
||
|
|
TestCase(refpath, write_response=True).test(lines, features)
|