Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c440fd0

Browse files
committed
Python: Adjust expectations for system command executions
I mostly did this to show my reviewers that the tests actually run and do something ;)
1 parent 060720a commit c440fd0

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
| SystemCommandExecution.py:16:10:16:21 | ControlFlowNode for Str | Fixed false negative:SystemCommandExecution_getCommand="cmd1; cmd2" |
2-
| SystemCommandExecution.py:17:11:17:22 | ControlFlowNode for Str | Fixed false negative:SystemCommandExecution_getCommand="cmd1; cmd2" |
3-
| SystemCommandExecution.py:27:11:27:22 | ControlFlowNode for Str | Fixed false negative:SystemCommandExecution_getCommand="cmd1; cmd2" |
4-
| SystemCommandExecution.py:28:12:28:23 | ControlFlowNode for Str | Fixed false negative:SystemCommandExecution_getCommand="cmd1; cmd2" |

python/ql/test/experimental/library-tests/frameworks/stdlib/SystemCommandExecution.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
# can't use a string literal with spaces in the tags of an InlineExpectationsTest, so using variables :|
1515

16-
os.popen("cmd1; cmd2") # $f-:SystemCommandExecution_getCommand="cmd1; cmd2"
17-
os.system("cmd1; cmd2") # $f-:SystemCommandExecution_getCommand="cmd1; cmd2"
16+
os.popen("cmd1; cmd2") # $SystemCommandExecution_getCommand="cmd1; cmd2"
17+
os.system("cmd1; cmd2") # $SystemCommandExecution_getCommand="cmd1; cmd2"
1818

1919

2020
def os_members():
@@ -24,8 +24,8 @@ def os_members():
2424
# :|
2525
from os import popen, system
2626

27-
popen("cmd1; cmd2") # $f-:SystemCommandExecution_getCommand="cmd1; cmd2"
28-
system("cmd1; cmd2") # $f-:SystemCommandExecution_getCommand="cmd1; cmd2"
27+
popen("cmd1; cmd2") # $SystemCommandExecution_getCommand="cmd1; cmd2"
28+
system("cmd1; cmd2") # $SystemCommandExecution_getCommand="cmd1; cmd2"
2929

3030

3131
########################################

0 commit comments

Comments
 (0)