Core test package
[1/7] from: M8R-kr0jkp:mailinator:Thu:Oct:14:09:21:45:2010 at: 14-Oct-2010 15:21
The
http://www.rebol.org/view-script.r?script=test-framework.r
is the test framework used to test R2 and R3 core. Related scripts are:
http://www.rebol.org/view-script.r?script=core-tests-run-safe.r
and
http://www.rebol.org/view-script.r?script=core-tests-run.r
demonstrating how to run the core tests.
The core tests are in the
http://www.rebol.org/view-script.r?script=core-test-package.r
The doc article is at:
http://www.rebol.org/art-display-article.r?article=n28vx
I want to make some volunteers coauthors of the
http://www.rebol.org/view-script.r?script=core-test-package.r
to help me adding new tests, and/or update the old ones. Please, contact me privately
in case you are interested.
-TIA Ladislav
P.S.
If you want to compare your test results, the last row in my %cpl_2_100_107_3_1.log file
is:
Total: 3822 Succeeded: 3769 Failed: 53
There is one issue I want to discuss:
the test framework handles the tests as "chunks of text", thus, not needing to rely on
accuracy of MOLD or MOLD/ALL, as well as being able to test even the loadability of the
tests
Due to the above reasons, I see this property of the test dialect as *absolutely essential*.
Nevertheless, the textual character of the test cases is not "absolute", the test cases
have to be in "propertly matched parentheses". This is actually a quite strong requirement,
since e.g. a file containing a "test case" like:
[ (])]
, or:
["]
as a different example aren't test cases, and a file containing them would not be considered
well-formed.
There is a possibility to relax this requirement even more using the heredoc convention,
e.g. like this
<<<mytest
mytest
, where the
<<<mytest
and
mytest
tags" mark the beginning and the end of the test. If this convention were chosen, the
example test would become a "well-formed test" (which would fail being not loadable,
though), as opposed to the current state.
My question is, which alternative is preferred by people who intend to write (or even
read) some tests.
[2/7] from: M8R-kr0jkp:mailinator:Thu:Oct:14:09:26:35:2010 at: 14-Oct-2010 15:26
Note: Sunanda is working on package downloader to work in R3 also,
which is not the case yet. Give him a couple of days.
Thanks.
-Ladislav
[3/7] from: dhsunanda:gma:il at: 15-Oct-2010 13:55
> Note: Sunanda is working on package downloader to work in R3 also,
> which is not the case yet. Give him a couple of days.
Lots of fun in doing that!
Here's an interim way of accessing the core-test file(s):
do http://www.rebol.org/library/public/get-core-tests.r
get-core-test %folder-to-save-test-files
Notes:
===========
1. This code should work with R2 and R3
2. %folder-to-save-test-files ;; replace with your folder name, obviously!
3a. In R3 you may need to precede the code with
secure none
(or a weaker version of the same) to give the code permission to
create and populate a folder
3b. In R2, you may get the usual pop-up asking permission to write to a
folder
4. It will only download the core-test-files if they have changed --- so
you can run this
regularly to get the latest versions
Thanks to Ladislav and Peter Wood for helping with the debugging on
this....It's helped generate a new Curecode ticket:
http://www.curecode.org/rebol3/ticket.rsp?id=1674&cursor=1
Sunanda
[4/7] from: M8R-kr0jkp:mailinator at: 15-Oct-2010 15:18
Sunanda wrote:
{Here's an interim way of accessing the core-test file(s):
do http://www.rebol.org/library/public/get-core-tests.r
get-core-test %folder-to-save-test-files
Lots of fun in doing that!}
Thanks, Sunanda
-Ladislav
[5/7] from: dhsunanda:gmai:l at: 17-Oct-2010 20:45
> On 15/10/2010 14:18, Ladislav wrote:
> Sunanda wrote:
> > Here's an interim way of accessing the core-test file(s)
[...omitted...]
> > Lots of fun in doing that!}
> > Thanks, Sunanda
The reference to lots of fun was debugging the differences between R2
and R3-latest-alpha to ensure one source can run from either.....It was
not a suggestion that any core testers would have more fun using the
interim way of accessing the core tests.
Good news:
Times moved on over the weekend. The interim way of accessing a specific
package has evolved into a general way of accessing any package in the
Library. (More on that in another thread).
Specifically....the best way to get the latest version of Ladislav's
core tests is this one-liner:
do/args http://www.rebol.org/library/public/repack-solo.r
["core-test-package.r" %install-folder]
Where:
%install-folder -- is the folder into which you want to download the
tests.
It only downloads the tests if your local copy differs from the master
copy, so feel free to run regularly to get the latest tests.
And it should run unchanged with either R2 or R3
Now the bad news:
It is known to trigger CureCode ticket #1575 when running R3 on a MAC.
Only work-around found so far is to turn a trace on....
trace/function true
....And that increases the run time considerably.
Thanks to Peter Wood, Maxim, and Ladislav for help in testing repack-solo.r
Sunanda
[6/7] from: M8R-kr0jkp:mailinator at: 30-Oct-2010 15:55
Due to the following reasons:
* GitHub is used for more REBOL-related projects
* at GitHub, user rights can be adjusted more finely than at rebol.org
* popular request
* hoping, that this change will encourage more people to participate
I decided to move REBOL test framework and core tests to
http://github.com/rebolsource/rebol-test
So, please try to run the tests, and have a look at the documentation:
http://www.rebol.org/art-display-article.r?article=n28vx
, and, eventually start to enhance the %core-tests.r test suite.
The following areas are not covered yet (or covered incompletely), and can use your work:
* PARSE tests (for R2, as well as for R3)
* closure datatype tests
* check, whether the percent! datatype is covered completely enough, comparing the tests
to the tests that can be found at http://www.rebol.net/wiki/Percent
* check, whether the CureCode tickets are covered, adding the missing tests
* module! datatype tests
-Ladislav
[7/7] from: M8R-kr0jkp:mailinator at: 30-Oct-2010 16:45
Oh, and I forgot to thank to Andreas, who started the repository and moved the file,
so, Andreas, thank you.
-Ladislav