summaryrefslogtreecommitdiffstats
path: root/tests/snippets/apacheconf
diff options
context:
space:
mode:
Diffstat (limited to 'tests/snippets/apacheconf')
-rw-r--r--tests/snippets/apacheconf/test_directive_no_args.txt12
-rw-r--r--tests/snippets/apacheconf/test_fix_lock_absolute_path.txt8
-rw-r--r--tests/snippets/apacheconf/test_include_globs.txt8
-rw-r--r--tests/snippets/apacheconf/test_malformed_scoped_directive_closing_tag.txt19
-rw-r--r--tests/snippets/apacheconf/test_multi_include_globs.txt8
-rw-r--r--tests/snippets/apacheconf/test_multi_include_globs_root.txt8
-rw-r--r--tests/snippets/apacheconf/test_multiline_argument.txt20
-rw-r--r--tests/snippets/apacheconf/test_multiline_comment.txt12
-rw-r--r--tests/snippets/apacheconf/test_normal_scoped_directive.txt14
9 files changed, 109 insertions, 0 deletions
diff --git a/tests/snippets/apacheconf/test_directive_no_args.txt b/tests/snippets/apacheconf/test_directive_no_args.txt
new file mode 100644
index 0000000..a2f3354
--- /dev/null
+++ b/tests/snippets/apacheconf/test_directive_no_args.txt
@@ -0,0 +1,12 @@
+---input---
+Example
+ServerName localhost
+
+---tokens---
+'Example' Name.Builtin
+'\n' Text.Whitespace
+
+'ServerName' Name.Builtin
+' ' Text.Whitespace
+'localhost' Text
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_fix_lock_absolute_path.txt b/tests/snippets/apacheconf/test_fix_lock_absolute_path.txt
new file mode 100644
index 0000000..a274834
--- /dev/null
+++ b/tests/snippets/apacheconf/test_fix_lock_absolute_path.txt
@@ -0,0 +1,8 @@
+---input---
+LockFile /var/lock/apache2/accept.lock
+
+---tokens---
+'LockFile' Name.Builtin
+' ' Text.Whitespace
+'/var/lock/apache2/accept.lock' Literal.String.Other
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_include_globs.txt b/tests/snippets/apacheconf/test_include_globs.txt
new file mode 100644
index 0000000..495242e
--- /dev/null
+++ b/tests/snippets/apacheconf/test_include_globs.txt
@@ -0,0 +1,8 @@
+---input---
+Include /etc/httpd/conf.d/*.conf
+
+---tokens---
+'Include' Name.Builtin
+' ' Text.Whitespace
+'/etc/httpd/conf.d/*.conf' Literal.String.Other
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_malformed_scoped_directive_closing_tag.txt b/tests/snippets/apacheconf/test_malformed_scoped_directive_closing_tag.txt
new file mode 100644
index 0000000..c65628b
--- /dev/null
+++ b/tests/snippets/apacheconf/test_malformed_scoped_directive_closing_tag.txt
@@ -0,0 +1,19 @@
+---input---
+<VirtualHost "test">
+</VirtualHost
+>
+
+---tokens---
+'<VirtualHost' Name.Tag
+' ' Text.Whitespace
+'"test"' Literal.String
+'>' Name.Tag
+'\n' Text.Whitespace
+
+'<' Error
+'/' Error
+'VirtualHost' Name.Builtin
+'\n' Text.Whitespace
+
+'>' Error
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_multi_include_globs.txt b/tests/snippets/apacheconf/test_multi_include_globs.txt
new file mode 100644
index 0000000..abf5bb0
--- /dev/null
+++ b/tests/snippets/apacheconf/test_multi_include_globs.txt
@@ -0,0 +1,8 @@
+---input---
+Include /etc/httpd/conf.d/*/*.conf
+
+---tokens---
+'Include' Name.Builtin
+' ' Text.Whitespace
+'/etc/httpd/conf.d/*/*.conf' Literal.String.Other
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_multi_include_globs_root.txt b/tests/snippets/apacheconf/test_multi_include_globs_root.txt
new file mode 100644
index 0000000..5df63e4
--- /dev/null
+++ b/tests/snippets/apacheconf/test_multi_include_globs_root.txt
@@ -0,0 +1,8 @@
+---input---
+Include /*conf/*.conf
+
+---tokens---
+'Include' Name.Builtin
+' ' Text.Whitespace
+'/*conf/*.conf' Literal.String.Other
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_multiline_argument.txt b/tests/snippets/apacheconf/test_multiline_argument.txt
new file mode 100644
index 0000000..4163970
--- /dev/null
+++ b/tests/snippets/apacheconf/test_multiline_argument.txt
@@ -0,0 +1,20 @@
+---input---
+SecAction \
+ "id:'900001', \
+ phase:1, \
+ t:none, \
+ setvar:tx.critical_anomaly_score=5, \
+ setvar:tx.error_anomaly_score=4, \
+ setvar:tx.warning_anomaly_score=3, \
+ setvar:tx.notice_anomaly_score=2, \
+ nolog, \
+ pass"
+
+---tokens---
+'SecAction' Name.Builtin
+' ' Text.Whitespace
+'\\\n' Text
+
+' ' Text.Whitespace
+'"id:\'900001\', \\\n phase:1, \\\n t:none, \\\n setvar:tx.critical_anomaly_score=5, \\\n setvar:tx.error_anomaly_score=4, \\\n setvar:tx.warning_anomaly_score=3, \\\n setvar:tx.notice_anomaly_score=2, \\\n nolog, \\\n pass"' Literal.String.Double
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_multiline_comment.txt b/tests/snippets/apacheconf/test_multiline_comment.txt
new file mode 100644
index 0000000..cdcfe01
--- /dev/null
+++ b/tests/snippets/apacheconf/test_multiline_comment.txt
@@ -0,0 +1,12 @@
+---input---
+#SecAction \
+ "id:'900004', \
+ phase:1, \
+ t:none, \
+ setvar:tx.anomaly_score_blocking=on, \
+ nolog, \
+ pass"
+
+---tokens---
+'#SecAction \\\n "id:\'900004\', \\\n phase:1, \\\n t:none, \\\n setvar:tx.anomaly_score_blocking=on, \\\n nolog, \\\n pass"' Comment
+'\n' Text.Whitespace
diff --git a/tests/snippets/apacheconf/test_normal_scoped_directive.txt b/tests/snippets/apacheconf/test_normal_scoped_directive.txt
new file mode 100644
index 0000000..f00496d
--- /dev/null
+++ b/tests/snippets/apacheconf/test_normal_scoped_directive.txt
@@ -0,0 +1,14 @@
+---input---
+<VirtualHost "test">
+</VirtualHost>
+
+---tokens---
+'<VirtualHost' Name.Tag
+' ' Text.Whitespace
+'"test"' Literal.String
+'>' Name.Tag
+'\n' Text.Whitespace
+
+'</VirtualHost' Name.Tag
+'>' Name.Tag
+'\n' Text.Whitespace