Commit Graph

12 Commits (master)

Author SHA1 Message Date
gargaml 549ee53266 Roman numerals (#4413)
* First shot at improving roman numeral IA.

Added a new converter.
Added new default settings.
Added some tests.

* Added un upper bound on arabic numbers.

* Remove some typo…

* Added some new triggers.
Allowed uncorrect roman number to load the UI anyway.
Fixed a test.

* Added new triggers.
Fixed regular expressions involved in the UI configuration.
Added new tests.

* Renamed file.

* Variables defined outside the handle function.

* Modified template.

* Init logic now runs only once.

* Added a prefix to ensure there are no collisions.

* Fixed tests.

* Added more agressive validation on user inputs.

* Fixed a test case for aggressive validation.  The ia doesn't trigger is
the input is invalid with respect to roman numeral system.

* Removed forEach operation (replaced with a for loop).

Removed firstLetterUpperCase in favor of DDG util capitalize.

* Fixed design on narrow screens.

* Added a new test (roman man => undef).

* Fixed regular expressions to avoid displaying if roman or arabic is used
without numbers.

* Added warnings when inputs are out of range.

* Added a state variable for warnings.

* Empty if removed.

* Fixed regexps.

* Fixed subtitle.

* Css fixed. Both for mobile and desktop.

* Fixed tests.

* Use horizontal layout on desktop, vertical on mobile
2017-09-19 11:29:52 -04:00
Zaahir Moolla 96bfdab046 Revert "Roman numerals (improvements) (#4402)" (#4412)
This reverts commit 026279bb6a.
2017-08-09 12:46:46 -04:00
gargaml 026279bb6a Roman numerals (improvements) (#4402)
* First shot at improving roman numeral IA.

Added a new converter.
Added new default settings.
Added some tests.

* Added un upper bound on arabic numbers.

* Remove some typo…

* Added some new triggers.
Allowed uncorrect roman number to load the UI anyway.
Fixed a test.

* Added new triggers.
Fixed regular expressions involved in the UI configuration.
Added new tests.
2017-08-09 11:59:17 +03:00
hchienjo 3dcbe322ba Add tests for 'X to roman numerals' triggers. 2016-09-03 13:16:44 +00:00
hchienjo f9f900b420 Add tests for 'X in roman numeral' bug https://github.com/duckduckgo/zeroclickinfo-goodies/issues/3484. 2016-08-15 10:25:36 +00:00
Rob Emery 62faa0c3ce Roman: Switching to text template 2016-05-18 23:13:31 +01:00
Ben Moon 83b9bbd6b7 Fix newline at end of file 2016-05-16 14:19:39 +01:00
Ben Moon 5f85cf4121 Update Goodies to use Test::Deep
* Ensure Test::Deep is imported.

* Replace '-ANY-' with ignore()

* Replace regexes with re(...)
2016-05-16 14:07:57 +01:00
Matt Miller 3b7c7ec19e Roman: add structured answer 2014-11-15 21:33:00 +02:00
Eric Johnson 9c29b27338 Added tests for example queries which are not currently tested.
Conflicts:

	t/TimezoneConverter.t
2014-02-10 21:36:14 +00:00
Michael Smith fd85535679 make tests from old queries.txts 2012-05-29 16:40:59 -06:00
Dylan Lloyd d2bde79efc Added tests for Base64, Dice, EmToPx, FlipText, GoldenRatio, Guid, Periemeter, Roman, SigFigs, TitleCase, Unicode 2012-04-15 19:17:12 -04:00