Both formats look good, so I'll take the best parts of each:
- Unit tests:
- Tiddlers tagged with FormulaTest.
- Text is expected to render to TRUE
- Advanced: If the field match is present on the tiddler, text is
instead expected to render to the same result as rendering match.
- Name using a prefix scheme based on the test subject
- Bugs: FormulaTest/Regression/<Test Name>
- Functions: FormulaTest/Functions/<Function Name>/<Test Name>
- Function names in ALL CAPS
- Language: FormulaTest/Feature/<Feature Name>/<Test Name>
- Feature names being things like "Let", "Function", "Closure",
"Transclude"
- Syntax & Compilation: FormulaTest/Compiler/<Feature Name>/<Test
Name>
- Miscellaneous Tests: FormulaTest/Misc/<Test Name>
- Additional tiddlers used as data in unit tests:
- Tag with FormulaTestData.
- Prefix with the unit test's fully-prefixed name, with an additional
slash and name.
Ideally, unit tests and bug repros should be submitted on GitHub (see my
call for unit tests there
<https://github.com/EvanBalster/TiddlyWikiFormula/issues/17>) but uploading
JSON files in this thread is OK too.
On Friday, 19 January 2018 10:37:43 UTC-6, Diego Mesa wrote:
>
> Hey Evan,
>
> I was going to start adding some more, but the format you described above
> is slightly different than the previous one:
>
>
> http://evanbalster.com/tiddlywiki/formulas.html#UnitTest%2FFunctions%2Fnth%2Fsorted-return
>
> Which do you think we should stick with?
>
> Diego
>
> On Friday, January 19, 2018 at 1:28:44 AM UTC-6, Evan Balster wrote:
>>
>> Bug(s) confirmed — array and date formatting aren't working correctly.
>> Need to investigate why.
>>
>> There is also an issue with parsing block comments in Formula 0.2.1,
>> which has been fixed in the repo.
>>
>> Suggested format for unit-test and bug-repro contributions:
>>
>> - Tag with "FormulaTest"
>> - Prefix "Test/"
>> - Text comprises a single formula construct (of any type) whose
>> result should render to TRUE, *or* match the result of rendering field
>> "match" of the tiddler if present.
>> - Submitted as JSON files here
>>
>>
>> On Thursday, 18 January 2018 22:18:55 UTC-6, Mr. Mal wrote:
>>>
>>> I think the now and date function not working in this release. May be
>>> others can confirm this "bug".
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/84cf0450-4e1f-4a80-8fad-a37d987b6bec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.