Merge remote-tracking branch 'upstream/pmd/7.0.x' into text-utils-simple
This commit is contained in:
@ -42,8 +42,19 @@ public class PythonTokenizerTest extends CpdTextComparisonTest {
|
||||
doTest("backticks");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnicode() {
|
||||
doTest("sample_unicode");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTabWidth() {
|
||||
doTest("tabWidth");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVarWithDollar() {
|
||||
doTest("var_with_dollar");
|
||||
}
|
||||
|
||||
}
|
||||
|
4
pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.py
vendored
Normal file
4
pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.py
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# note: add more examples here when bugs arise
|
||||
|
||||
def check():
|
||||
total_cost_μs = [] # https://github.com/pmd/pmd/issues/2604
|
13
pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.txt
vendored
Normal file
13
pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/sample_unicode.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
[Image] or [Truncated image[ Bcol Ecol
|
||||
L3
|
||||
[def] 1 4
|
||||
[check] 5 10
|
||||
[(] 10 11
|
||||
[)] 11 12
|
||||
[:] 12 13
|
||||
L4
|
||||
[total_cost_μs] 5 18
|
||||
[=] 19 20
|
||||
[\[] 21 22
|
||||
[\]] 22 23
|
||||
EOF
|
@ -0,0 +1,2 @@
|
||||
def check():
|
||||
a$a = []
|
13
pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.txt
vendored
Normal file
13
pmd-python/src/test/resources/net/sourceforge/pmd/lang/python/cpd/testdata/var_with_dollar.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
[Image] or [Truncated image[ Bcol Ecol
|
||||
L1
|
||||
[def] 1 4
|
||||
[check] 5 10
|
||||
[(] 10 11
|
||||
[)] 11 12
|
||||
[:] 12 13
|
||||
L2
|
||||
[a$a] 5 8
|
||||
[=] 9 10
|
||||
[\[] 11 12
|
||||
[\]] 12 13
|
||||
EOF
|
Reference in New Issue
Block a user