Skip to content

Commit 25c6fb5

Browse files
committed
Added chaining tests for underscore.string package.
1 parent b59b9c8 commit 25c6fb5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,21 @@ function multiSource() {
8080
sink(s.quote(source("s21"), "quote")); // $ hasTaintFlow=s21
8181
sink(s.quote("base", source("s22"))); // $ hasTaintFlow=s22
8282
}
83+
84+
function chaining() {
85+
sink(s(source("s1"))
86+
.slugify().capitalize().decapitalize().clean().cleanDiacritics()
87+
.swapCase().escapeHTML().unescapeHTML().wrap().dedent()
88+
.reverse().pred().succ().titleize().camelize().classify()
89+
.underscored().dasherize().humanize().trim().ltrim().rtrim()
90+
.truncate().sprintf().strRight().strRightBack()
91+
.strLeft().strLeftBack().stripTags().unquote().value()); // $ MISSING: hasTaintFlow=s1
92+
93+
sink(s(source("s2"))
94+
.insert(4, source("s3")).replaceAll("a", source("s4"))
95+
.join(",", source("s5")).splice(1, 2, source("s6"))
96+
.prune(1, source("s7")).pad(10, source("s8"), "right")
97+
.lpad(10, source("s9")).rpad(10, source("s10"))
98+
.repeat(3, source("s11")).surround(source("s12"))
99+
.quote(source("s13")).value()); // $ MISSING: hasTaintFlow=s2 MISSING: hasTaintFlow=s3 MISSING: hasTaintFlow=s4 MISSING: hasTaintFlow=s5 MISSING: hasTaintFlow=s6 MISSING: hasTaintFlow=s7 MISSING: hasTaintFlow=s8 MISSING: hasTaintFlow=s9 MISSING: hasTaintFlow=s10 MISSING: hasTaintFlow=s11 MISSING: hasTaintFlow=s12 MISSING: hasTaintFlow=s13
100+
}

0 commit comments

Comments
 (0)