summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2022-02-13 01:39:22 +0100
committerStephan Seitz <stephan.seitz@fau.de>2022-02-13 12:19:54 +0100
commit6e7c8c4fede3dba3845f6a31d98746646b9831dc (patch)
treea778fb431a4f897cfc08cf37af9081fc491e06f1 /tests
parent3fbf280e349cfbac26fd6069f40c4d727ccd3c88 (diff)
tests: add failing test for incomplete arguments
Diffstat (limited to 'tests')
-rw-r--r--tests/indent/php/unfinished-call.php6
-rw-r--r--tests/indent/php_spec.lua6
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/indent/php/unfinished-call.php b/tests/indent/php/unfinished-call.php
new file mode 100644
index 00000000..396d7174
--- /dev/null
+++ b/tests/indent/php/unfinished-call.php
@@ -0,0 +1,6 @@
+<?php
+
+Route::get(
+ '/',
+ 1,
+ aaaaaaaaaaaaaaaaaaaaaaaaa,
diff --git a/tests/indent/php_spec.lua b/tests/indent/php_spec.lua
index e2655b83..722f5c0b 100644
--- a/tests/indent/php_spec.lua
+++ b/tests/indent/php_spec.lua
@@ -1,4 +1,5 @@
local Runner = require("tests.indent.common").Runner
+local XFAIL = require("tests.indent.common").XFAIL
local run = Runner:new(it, "tests/indent/php", {
tabstop = 4,
@@ -10,7 +11,9 @@ local run = Runner:new(it, "tests/indent/php", {
describe("indent PHP:", function()
describe("whole file:", function()
run:whole_file(".", {
- expected_failures = {},
+ expected_failures = {
+ "./unfinished-call.php",
+ },
})
end)
@@ -21,5 +24,6 @@ describe("indent PHP:", function()
{ on_line = 5, text = "indendation with `enter` in insert mode is not correct", indent = 4 }
)
run:new_line("issue-2497.php", { on_line = 5, text = "$a =", indent = 4 })
+ run:new_line("unfinished-call.php", { on_line = 6, text = "$a =", indent = 4 }, "shouldn't be 0", XFAIL)
end)
end)