mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
12
spec/tests/apacheconf/test_directive_no_args.txt
Normal file
12
spec/tests/apacheconf/test_directive_no_args.txt
Normal file
@ -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
|
8
spec/tests/apacheconf/test_fix_lock_absolute_path.txt
Normal file
8
spec/tests/apacheconf/test_fix_lock_absolute_path.txt
Normal file
@ -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
|
8
spec/tests/apacheconf/test_include_globs.txt
Normal file
8
spec/tests/apacheconf/test_include_globs.txt
Normal file
@ -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
|
@ -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
|
8
spec/tests/apacheconf/test_multi_include_globs.txt
Normal file
8
spec/tests/apacheconf/test_multi_include_globs.txt
Normal file
@ -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
|
8
spec/tests/apacheconf/test_multi_include_globs_root.txt
Normal file
8
spec/tests/apacheconf/test_multi_include_globs_root.txt
Normal file
@ -0,0 +1,8 @@
|
||||
---input---
|
||||
Include /*conf/*.conf
|
||||
|
||||
---tokens---
|
||||
'Include' Name.Builtin
|
||||
' ' Text.Whitespace
|
||||
'/*conf/*.conf' Literal.String.Other
|
||||
'\n' Text.Whitespace
|
20
spec/tests/apacheconf/test_multiline_argument.txt
Normal file
20
spec/tests/apacheconf/test_multiline_argument.txt
Normal file
@ -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
|
12
spec/tests/apacheconf/test_multiline_comment.txt
Normal file
12
spec/tests/apacheconf/test_multiline_comment.txt
Normal file
@ -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
|
14
spec/tests/apacheconf/test_normal_scoped_directive.txt
Normal file
14
spec/tests/apacheconf/test_normal_scoped_directive.txt
Normal file
@ -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
|
Reference in New Issue
Block a user