TT#44969 Provide test cases for `git status --porcelain` mode

Change-Id: Iaf167a9a8ad12d36a9b9ebe8250c2b91a56ff239
changes/56/24556/1
Michael Prokop 8 years ago
parent 7f92e243ee
commit 0e84ac6e21

@ -47,3 +47,18 @@ def test_status_output(cli, gitrepo):
# before it was "working directory"
regex = re.compile(r"nothing to commit, working (tree|directory)")
assert re.search(regex, out)
ex, out, error = git.status('--porcelain=v2')
assert out == ""
assert error == ""
assert ex == 0
# create new file
newfile = os.path.join(git.root, 'newfile')
with open(newfile, 'w') as fd:
fd.write('#!/bin/sh\necho "Hello World"\n')
ex, out, error = git.status('--porcelain=v2')
assert out == '''? newfile\n'''
assert error == ""
assert ex == 0

Loading…
Cancel
Save