@@ -15,12 +15,23 @@ def rename_git():
15
15
@pytest .mark .parametrize ("short_flag" , ["" , "-s" , "--short" ])
16
16
@pytest .mark .parametrize ("long_flag" , ["" , "--long" ])
17
17
def test_status_format (rename_git , git2cpp_path , short_flag , long_flag ):
18
- cmd = [git2cpp_path , 'status' , short_flag , long_flag ]
18
+ cmd = [git2cpp_path , 'status' ]
19
+ if short_flag != "" :
20
+ cmd .append (short_flag )
21
+ if long_flag != "" :
22
+ cmd .append (long_flag )
19
23
p = subprocess .run (cmd , capture_output = True , cwd = "test/data/status_data" , text = True )
20
24
21
25
if (long_flag == "--long" ) or ((long_flag == "" ) & (short_flag == "" )):
22
26
assert "Changes to be committed" in p .stdout
23
- elif short_flag in ["-s" , "--short" ]:
24
- pass
27
+ assert "Changes not staged for commit" in p .stdout
28
+ assert "Untracked files" in p .stdout
29
+ assert "new file" in p .stdout
30
+ assert "deleted" in p .stdout
31
+ assert "modified" in p .stdout
25
32
26
- print (p .stdout )
33
+ elif short_flag in ["-s" , "--short" ]:
34
+ assert "D " in p .stdout
35
+ assert " M " in p .stdout
36
+ assert " D " in p .stdout
37
+ assert "?? " in p .stdout
0 commit comments