aboutsummaryrefslogtreecommitdiff
path: root/plugins/editorconfig/tests/parser/comments.in
diff options
context:
space:
mode:
authorJefferson González <jgmdev@gmail.com>2022-12-24 23:06:24 -0400
committerGitHub <noreply@github.com>2022-12-24 23:06:24 -0400
commit363c3eb859ddbe1efad5949ad087c8e7db6cee41 (patch)
treedf6ae14c1b360d710ce0d4b5c11950e91a2d0517 /plugins/editorconfig/tests/parser/comments.in
parent7bb53600a33c2f630f2a0850a543c356a856f172 (diff)
downloadlite-xl-plugins-363c3eb859ddbe1efad5949ad087c8e7db6cee41.tar.gz
lite-xl-plugins-363c3eb859ddbe1efad5949ad087c8e7db6cee41.zip
added editorconfig plugin (#163)
* properly ignore comments on declarations * strip newlines when insert_final_newline set to false * force match up to the end * support unset property * make property values case insensitive * handle indent_size when set to tab * handle escaped comment chars * also lowercase property names * support utf-8 as on spec * apply rules to unsaved unamed/named docs * annotation fix * added test suite and fixes for 100% pass rate * do not force match from start, breaks 2 tests * allow starting wild cards to match everything * disabled print buffering * make last line visible if insert_final_newline true * use log_quiet for debug * adapted to changes on lite-xl/lite-xl#1232 * properly return from add/remove_project_directory overrides * Use new trimwhitespace functionality if possible
Diffstat (limited to 'plugins/editorconfig/tests/parser/comments.in')
-rw-r--r--plugins/editorconfig/tests/parser/comments.in47
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/editorconfig/tests/parser/comments.in b/plugins/editorconfig/tests/parser/comments.in
new file mode 100644
index 0000000..c49fba8
--- /dev/null
+++ b/plugins/editorconfig/tests/parser/comments.in
@@ -0,0 +1,47 @@
+; test comments
+
+root = true
+
+[test3.c]
+; Comment before properties ignored
+key=value
+
+[test4.c]
+key1=value1
+; Comment between properties ignored
+key2=value2
+
+; Semicolon or hash at end of value read as part of value
+[test5.c]
+key1=value; not comment
+key2=value # not comment
+
+; Backslash before a semicolon or hash is part of the value
+[test6.c]
+key1=value \; not comment
+key2=value \# not comment
+
+; Escaped semicolon in section name
+[test\;.c]
+key=value
+
+[test9.c]
+# Comment before properties ignored
+key=value
+
+[test10.c]
+key1=value1
+# Comment between properties ignored
+key2=value2
+
+# Octothorpe at end of value read as part of value
+[test11.c]
+key=value# not comment
+
+# Escaped octothorpe in value
+[test12.c]
+key=value \# not comment
+
+# Escaped octothorpe in section name
+[test\#.c]
+key=value