Skip to content

Commit 09f73d8

Browse files
committed
JS: Add: test cases for toWellFormed
1 parent 596cfcf commit 09f73d8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function test() {
2+
let x = source();
3+
sink(x.toWellFormed()); // NOT OK -- Currently not tainted, but should be
4+
5+
const wellFormedX = x.toWellFormed();
6+
sink(wellFormedX); // NOT OK -- Currently not tainted, but should be
7+
8+
const concatWellFormedX = "/" + wellFormedX + "!";
9+
sink(concatWellFormedX); // NOT OK -- Currently not tainted, but should be
10+
11+
sink(source().toWellFormed()); // NOT OK -- Currently not tainted, but should be
12+
}

0 commit comments

Comments
 (0)