From 428232d2fa920c57b0213f0b208ea5aac3f7c11c Mon Sep 17 00:00:00 2001 From: John Isom Date: Wed, 29 Jul 2020 15:05:49 -0600 Subject: [PATCH] Add tests for javascript deindenting --- .../javascript/deindent-complex-brace-structure/cmd | 1 + .../javascript/deindent-complex-brace-structure/in | 1 + .../javascript/deindent-complex-brace-structure/out | 12 ++++++++++++ .../javascript/deindent-complex-brace-structure/rc | 3 +++ 4 files changed, 17 insertions(+) create mode 100644 test/indent/javascript/deindent-complex-brace-structure/cmd create mode 100644 test/indent/javascript/deindent-complex-brace-structure/in create mode 100644 test/indent/javascript/deindent-complex-brace-structure/out create mode 100644 test/indent/javascript/deindent-complex-brace-structure/rc diff --git a/test/indent/javascript/deindent-complex-brace-structure/cmd b/test/indent/javascript/deindent-complex-brace-structure/cmd new file mode 100644 index 00000000..f9bfe77d --- /dev/null +++ b/test/indent/javascript/deindent-complex-brace-structure/cmd @@ -0,0 +1 @@ +cOif (true) {}hiOconsole.log();hhiO{},{},hhi1Ofoo: { bar: 1 },jjobaz: { bam: 2 }, diff --git a/test/indent/javascript/deindent-complex-brace-structure/in b/test/indent/javascript/deindent-complex-brace-structure/in new file mode 100644 index 00000000..0f89c5b3 --- /dev/null +++ b/test/indent/javascript/deindent-complex-brace-structure/in @@ -0,0 +1 @@ +for (let i = 1; i < 5; ++i) {%( )} diff --git a/test/indent/javascript/deindent-complex-brace-structure/out b/test/indent/javascript/deindent-complex-brace-structure/out new file mode 100644 index 00000000..1d675934 --- /dev/null +++ b/test/indent/javascript/deindent-complex-brace-structure/out @@ -0,0 +1,12 @@ +for (let i = 1; i < 5; ++i) { + if (true) { + console.log( + { + foo: { bar: 1 }, + }, + { + baz: { bam: 2 }, + }, + ); + } +} diff --git a/test/indent/javascript/deindent-complex-brace-structure/rc b/test/indent/javascript/deindent-complex-brace-structure/rc new file mode 100644 index 00000000..c975d253 --- /dev/null +++ b/test/indent/javascript/deindent-complex-brace-structure/rc @@ -0,0 +1,3 @@ +source "%val{runtime}/colors/default.kak" +source "%val{runtime}/rc/filetype/javascript.kak" +set buffer filetype javascript