Skip to content

Commit 1062aae

Browse files
committed
add test that the foo.bar package syntax works
1 parent ead9781 commit 1062aae

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

python/ql/test/library-tests/frameworks/data/test.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ isSink
4848
| test.py:87:8:87:67 | ControlFlowNode for Attribute() | test-sink |
4949
| test.py:89:21:89:23 | ControlFlowNode for one | test-source |
5050
| test.py:90:25:90:27 | ControlFlowNode for one | test-source |
51+
| test.py:95:6:95:9 | ControlFlowNode for baz1 | test-source |
52+
| test.py:98:6:98:9 | ControlFlowNode for baz2 | test-source |
5153
isSource
5254
| test.py:3:5:3:15 | ControlFlowNode for getSource() | test-source |
5355
| test.py:9:8:9:14 | ControlFlowNode for alias() | test-source |

python/ql/test/library-tests/frameworks/data/test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,9 @@ def secondAndAfter(self, arg1, arg2, arg3, arg4, arg5):
9090
CallFilter.arityOne(one=one) # match
9191
CallFilter.arityOne(one, two=two) # NO match
9292
CallFilter.arityOne(one=one, two=two) # NO match
93+
94+
from foo1.bar import baz1
95+
baz1(baz1) # match
96+
97+
from foo2.bar import baz2
98+
baz2(baz2) # match

python/ql/test/library-tests/frameworks/data/test.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ class Sinks extends ModelInput::SinkModelCsv {
4848
// any argument
4949
"testlib;;Member[ArgPos].Member[anyParam].Argument[any];test-source", //
5050
"testlib;;Member[ArgPos].Member[anyNamed].Argument[any-named];test-source", //
51+
// testing package syntax
52+
"foo1.bar;;Member[baz1].Argument[any];test-source", //
53+
"foo2;;Member[bar].Member[baz2].Argument[any];test-source", //
5154
]
5255
}
5356
}

0 commit comments

Comments
 (0)