Skip to content

Commit 560b3da

Browse files
committed
JS: Add test with some special Vue attributes
1 parent 7ddc8f0 commit 560b3da

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<Blah :colonProp="x" @atProp="x" />
3+
<Blah :colonField.field="x" />
4+
</template>
5+
<script></script>

javascript/ql/test/library-tests/frameworks/Vue/tests.expected

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ component
7676
| single-file-component-3.vue:0:0:0:0 | single-file-component-3.vue |
7777
| single-file-component-4.vue:0:0:0:0 | single-file-component-4.vue |
7878
| single-file-component-5.vue:0:0:0:0 | single-file-component-5.vue |
79+
| special-syntax.vue:0:0:0:0 | special-syntax.vue |
7980
| tst.js:3:1:10:2 | new Vue ... 2\\n\\t}\\n}) |
8081
| tst.js:12:1:16:2 | new Vue ... \\t}),\\n}) |
8182
| tst.js:18:1:27:2 | Vue.com ... }\\n\\t}\\n}) |
@@ -126,6 +127,10 @@ templateElement
126127
| single-file-component-5.vue:2:5:18:9 | <p>...</> |
127128
| single-file-component-5.vue:4:1:16:9 | <script>...</> |
128129
| single-file-component-5.vue:17:1:18:8 | <style>...</> |
130+
| special-syntax.vue:1:1:4:11 | <template>...</> |
131+
| special-syntax.vue:2:3:2:37 | <blah>...</> |
132+
| special-syntax.vue:3:3:3:32 | <blah>...</> |
133+
| special-syntax.vue:5:1:5:17 | <script>...</> |
129134
xssSink
130135
| compont-with-route.vue:2:8:2:21 | v-html=dataA |
131136
| single-component-file-1.vue:2:8:2:21 | v-html=dataA |
@@ -161,3 +166,12 @@ remoteFlowSource
161166
| router.js:30:5:30:14 | from.query |
162167
| router.js:34:5:34:12 | to.query |
163168
| router.js:35:5:35:14 | from.query |
169+
parseErrors
170+
attribute
171+
| compont-with-route.vue:2:8:2:21 | v-html=dataA | v-html |
172+
| single-component-file-1.vue:2:8:2:21 | v-html=dataA | v-html |
173+
| single-file-component-2.vue:2:8:2:21 | v-html=dataA | v-html |
174+
| single-file-component-3.vue:2:8:2:21 | v-html=dataA | v-html |
175+
| single-file-component-3.vue:4:9:4:49 | src=./single-file-component-3-script.js | src |
176+
| single-file-component-4.vue:2:8:2:21 | v-html=dataA | v-html |
177+
| single-file-component-5.vue:2:8:2:21 | v-html=dataA | v-html |

javascript/ql/test/library-tests/frameworks/Vue/tests.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ query predicate templateElement(Vue::Template::Element template) { any() }
2020
query predicate xssSink(DomBasedXss::Sink s) { any() }
2121

2222
query RemoteFlowSource remoteFlowSource() { any() }
23+
24+
query predicate parseErrors(JSParseError err) { exists(err) }
25+
26+
query predicate attribute(HTML::Attribute attrib, string name) { attrib.getName() = name }

0 commit comments

Comments
 (0)