Zach Thompson
d664839c44
Merge pull request #2723 from duckduckgo/gd/cheatsheets-fix-section-tests
...
CheatSheets: Fix section tests
2016-03-10 12:23:16 -07:00
Ben Moon
526c363e16
Update test output to show all critical failures
...
Rather than just one at the end.
2016-03-10 17:49:36 +00:00
Ben Moon
9a343e1e39
Fix assigned categories not being set correctly
...
Whoops!
2016-03-10 16:45:03 +00:00
Ben Moon
47834bd7d9
Ensure default triggers are always critical
2016-03-10 16:19:34 +00:00
Ben Moon
5f9fa76873
Merge section contents tests
2016-03-10 15:53:41 +00:00
Ben Moon
54d0b7faad
Fix remaining section tests
...
They weren't accounting properly for invalid section values - this fixes
that.
2016-03-10 15:34:14 +00:00
Ben Moon
b752d0d893
Remove redundant %order hash
...
Use %sections with delete to get a hash with the appropriate items.
2016-03-10 15:33:27 +00:00
Zaahir Moolla
be7dbb3f63
Merge pull request #2333 from duckduckgo/gd/update-xs-libs
...
Update use of 'JSON' to 'JSON::MaybeXS'
2016-03-10 10:11:29 -05:00
Ben Moon
e81f8f5bdb
Move condition assignments into if
2016-03-09 15:29:06 +00:00
Ben Moon
6a45c21e94
Update section tests to report in bulk
...
I.e, they report all bad sections rather than failing on first one.
2016-03-09 15:17:24 +00:00
Ben Moon
e090a9949d
Make section tests case-sensitive
2016-03-09 14:56:50 +00:00
Ben Moon
570fcc8146
Make section tests critical
2016-03-09 14:49:29 +00:00
Ben Moon
064f17488c
Fix section tests
...
Anything that didn't contain alpha chars (and thus have something to
lowercase) was being removed entirely from the sections (causing a
warning), this fixes that.
2016-03-09 14:27:15 +00:00
Ben Moon
509f94af2c
Update CheatSheetsJSON to use JSON::MaybeXS
2016-03-08 16:35:34 +00:00
Ben Moon
c59aece0e1
Combine tests that rely on ID being present
2016-03-07 17:26:03 +00:00
Ben Moon
d8ff7c9ec4
Only warn if category not assigned to cheat sheet
...
For the alias-trigger tests.
2016-03-04 20:56:54 +00:00
Ben Moon
7b9c57d4b6
Remove 'any' trigger test
2016-03-04 19:52:57 +00:00
Ben Moon
a487995575
Whitelist 'duckduckgo-syntax' for category tests
...
I think this is the best option as it is the only case.
2016-03-04 19:06:00 +00:00
Ben Moon
8f8d49b5b2
Add test for aliases against custom triggers
...
Make sure aliases don't contain custom triggers defined in
'triggers.yaml'.
2016-03-03 20:41:44 +00:00
Ben Moon
2665cc33f0
Add test for triggers in aliases
...
Ensures aliases do not contain any of the triggers defined in
categories.
2016-03-03 20:26:51 +00:00
Ben Moon
3d192eead4
Update ID file name test
...
Only use conversion from ID to file name.
2016-03-02 20:06:49 +00:00
Ben Moon
30b501eb0f
Update trigger check to use more concise method
2016-03-02 19:37:33 +00:00
Ben Moon
cd80f72d73
Update trigger map
2016-03-02 19:27:27 +00:00
Ben Moon
a9d402b28f
Make use of global %triggers hash
2016-03-02 19:22:38 +00:00
Ben Moon
77a908d514
Add test for valid template type
2016-03-02 18:48:39 +00:00
Ben Moon
b6e806f36c
Add 're-adding category' test
2016-03-02 18:32:07 +00:00
Ben Moon
0c6a320ce9
Add test for duplicate triggers
2016-03-02 18:20:44 +00:00
Ben Moon
3b4c36fdd9
Improve file name ID check
2016-03-02 18:08:37 +00:00
Ben Moon
c4e20d56d2
Update alias tests to critical
2016-02-29 21:12:55 +00:00
Ben Moon
128bc4a3dc
Remove redundant sub
2016-02-29 21:11:06 +00:00
Ben Moon
5da5dbe3f7
Merge ID tests
...
Checking ID against file name and visa versa merged into one test.
2016-02-29 21:10:36 +00:00
Ben Moon
af83848b8d
Make uppercase check more explicit
2016-02-29 21:10:36 +00:00
Ben Moon
629d51f71d
Remove code-style tests
2016-02-29 21:10:36 +00:00
Ben Moon
818b680906
Add test for uppercase aliases
2016-02-29 21:10:36 +00:00
Ben Moon
236b0dc0ac
Clean up alias tests
2016-02-29 21:10:36 +00:00
Ben Moon
db20061b6b
Move alias tests into CheatSheets.t
2016-02-29 21:10:35 +00:00
Ben Moon
933cf80ef0
Add test for trailing whitespace
2016-02-29 21:10:35 +00:00
Ben Moon
0291a6c53e
Add file name test
...
Ensures file name matches ID
2016-02-29 21:10:35 +00:00
Ben Moon
8980550aec
Add test to make template_type mandatory
2016-02-29 21:10:35 +00:00
Ben Moon
3a5fcd5e21
Add ID tests
...
Checks the ID follows the expected naming conventions.
2016-02-29 21:10:35 +00:00
Ben Moon
f581026a1e
Add tests for indentation
...
1. Checks that tabs aren't used to indent.
2. Checks that indentation is a multiple of 4.
2016-02-29 21:10:35 +00:00
Ben Moon
8838f6ebc2
Add alias warnings to cheat sheet tests
2016-02-29 21:10:35 +00:00
Zaahir Moolla
5ef11eb8f6
remove unneeded print
2015-11-04 12:39:47 -05:00
Zaahir Moolla
bb41a1ca44
Move CheatSheet tests into subdir, rename JSON test
2015-11-04 12:34:17 -05:00