Skip to content

Commit dcc1e88

Browse files
committed
Added test cases for aliases.
1 parent 3a83c8d commit dcc1e88

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

javascript/ql/test/library-tests/TripleDot/underscore.string.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ function strToStr() {
3232
sink(s.stripTags(source("s29"))); // $ hasTaintFlow=s29
3333
sink(s.unquote(source("s30"), "quote")); // $ hasTaintFlow=s30
3434
sink(s.map(source("s31"), (x) => {return x;})); // $ hasTaintFlow=s31
35+
sink(s.strip(source("s32"),"charsToStrim")); // $ MISSING: hasTaintFlow=s32
36+
sink(s.lstrip(source("s33"),"charsToStrim")); // $ MISSING: hasTaintFlow=s33
37+
sink(s.rstrip(source("s34"),"charsToStrim")); // $ MISSING: hasTaintFlow=s34
38+
sink(s.camelcase(source("s35"))); // $ MISSING: hasTaintFlow=s35
3539
}
3640

3741
function strToArray() {
@@ -79,6 +83,15 @@ function multiSource() {
7983

8084
sink(s.quote(source("s21"), "quote")); // $ hasTaintFlow=s21
8185
sink(s.quote("base", source("s22"))); // $ hasTaintFlow=s22
86+
87+
sink(s.q(source("s23"), "quote")); // $ MISSING: hasTaintFlow=s23
88+
sink(s.q("base", source("s24"))); // $ MISSING: hasTaintFlow=s24
89+
90+
sink(s.rjust(source("s25"), 10, "charsToPad")); // $ MISSING: hasTaintFlow=s25
91+
sink(s.rjust("base", 10, source("s26"))); // $ MISSING: hasTaintFlow=s26
92+
93+
sink(s.ljust(source("s27"), 10, "charsToPad")); // $ MISSING: hasTaintFlow=s27
94+
sink(s.ljust("base", 10, source("s28"))); // $ MISSING: hasTaintFlow=s28
8295
}
8396

8497
function chaining() {
@@ -100,4 +113,8 @@ function chaining() {
100113

101114
sink(s(source("s14")).toUpperCase().toLowerCase().replace().slice(1).substring(1).substr(1).concat(source("s15")).split()); // $ hasTaintFlow=s14 hasTaintFlow=s15
102115

116+
sink(s(source("s16"))
117+
.strip().lstrip().rstrip().camelcase()
118+
.q(source("s17").ljust(10, source("s18"))
119+
.rjust(10, source("s19")))); // $ MISSING: hasTaintFlow=s16 MISSING: hasTaintFlow=s17 MISSING: hasTaintFlow=s18 MISSING: hasTaintFlow=s19
103120
}

0 commit comments

Comments
 (0)