[PATCH] indent: add html tests

4 views
Skip to first unread message

Felipe Contreras

unread,
Jul 27, 2022, 11:02:49 AM7/27/22
to vim...@vim.org, Bram Moolenaar, Felipe Contreras
To make sure javascript blocks are properly indented.

Signed-off-by: Felipe Contreras <felipe.c...@gmail.com>
---
runtime/indent/testdir/html.in | 8 ++++++++
runtime/indent/testdir/html.ok | 8 ++++++++
2 files changed, 16 insertions(+)

diff --git a/runtime/indent/testdir/html.in b/runtime/indent/testdir/html.in
index b62c67ddb..c60ffab2a 100644
--- a/runtime/indent/testdir/html.in
+++ b/runtime/indent/testdir/html.in
@@ -11,6 +11,10 @@ div#d2 { color: green; }
<script>
var v1 = "v1";
var v2 = "v2";
+ function test() {
+ let l1;
+ }
+ test();
</script>
<div>
<div>
@@ -66,6 +70,10 @@ div#d2 { color: green; }
<script>
var v1 = "v1";
var v2 = "v2";
+ function test() {
+ let l1;
+ }
+ test();
</script>
<div
class="test"
diff --git a/runtime/indent/testdir/html.ok b/runtime/indent/testdir/html.ok
index 938e965d8..dd5ed0150 100644
--- a/runtime/indent/testdir/html.ok
+++ b/runtime/indent/testdir/html.ok
@@ -11,6 +11,10 @@ div#d2 { color: green; }
<script>
var v1 = "v1";
var v2 = "v2";
+ function test() {
+ let l1;
+ }
+ test();
</script>
<div>
<div>
@@ -66,6 +70,10 @@ div#d2 { color: green; }
<script>
var v1 = "v1";
var v2 = "v2";
+function test() {
+ let l1;
+}
+test();
</script>
<div
class="test"
--
2.37.1.225.gfa48d685d2

Reply all
Reply to author
Forward
0 new messages