add test that the foo.bar package syntax works

This commit is contained in:
Erik Krogh Kristensen
2022-05-03 21:45:33 +02:00
parent ead978187d
commit 1062aae21c
3 changed files with 11 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ isSink
| test.py:87:8:87:67 | ControlFlowNode for Attribute() | test-sink |
| test.py:89:21:89:23 | ControlFlowNode for one | test-source |
| test.py:90:25:90:27 | ControlFlowNode for one | test-source |
| test.py:95:6:95:9 | ControlFlowNode for baz1 | test-source |
| test.py:98:6:98:9 | ControlFlowNode for baz2 | test-source |
isSource
| test.py:3:5:3:15 | ControlFlowNode for getSource() | test-source |
| test.py:9:8:9:14 | ControlFlowNode for alias() | test-source |

View File

@@ -90,3 +90,9 @@ CallFilter.arityOne(one) # match
CallFilter.arityOne(one=one) # match
CallFilter.arityOne(one, two=two) # NO match
CallFilter.arityOne(one=one, two=two) # NO match
from foo1.bar import baz1
baz1(baz1) # match
from foo2.bar import baz2
baz2(baz2) # match

View File

@@ -48,6 +48,9 @@ class Sinks extends ModelInput::SinkModelCsv {
// any argument
"testlib;;Member[ArgPos].Member[anyParam].Argument[any];test-source", //
"testlib;;Member[ArgPos].Member[anyNamed].Argument[any-named];test-source", //
// testing package syntax
"foo1.bar;;Member[baz1].Argument[any];test-source", //
"foo2;;Member[bar].Member[baz2].Argument[any];test-source", //
]
}
}