[tap-l] multi-file TAP
Eric Wilhelm
scratchcomputing at gmail.com
Sat Apr 7 21:01:25 BST 2007
# from Andy Armstrong
# on Saturday 07 April 2007 08:58 am:
>plan 4
>begin "Spigot extraction"
> plan 3
> ok 1 Spigot::Extractor loaded
> ok 2 Spigot visble
> not ok 3 Spigot free
>end
>begin "Documentation"
> plan 1
> ok 1 Documentation makes sense
>end
>ok 3 All tests completed
Doesn't that last line invalidate the 'plan 4' bit?
If we're indenting, couldn't we do without the 'end'?
Even without indenting, I'm a bit wary of a begin/end scheme simply
because it allows results and files the same status. It's like a data
structure of:
- value
- [list of values]
- value
- [list of values [list of values] value]
- value
It seems it would make more sense as:
- [list of values]
- [[lists of lists], [of values]]
Or at least, not allowing trailing and interspersed bits:
- value
- value
-
- list
- of
- values
-
- value
- value
-
- list
- of
- values
Maybe I'm just suffering the xml jitters. Even the above scares me.
It's like we're going to build a data structure using only the tag
<node>.
What about a directory/file concept? Directories have no values, they
are just containers.
container top
begin foo
ok 1
container category1
begin bar
ok 1
container category1.1
begin baz
ok 1
begin bat
ok 1
container category2
begin foo
ok 1
Or so, representing this tree
top/
|-- category1
| |-- bar
| `-- category1.1
| |-- bat
| `-- baz
|-- category2
| `-- foo
`-- foo
There's nothing in that which says a test file can't pretend to be a
directory, only that it can't simultaneously be a file and a directory.
The flat directory would then be:
begin foo
ok 1
begin bar
ok 1
Where the root container is implied, just as begin is implied for a
single file.
--Eric
--
If the collapse of the Berlin Wall had taught us anything, it was that
socialism alone was not a sustainable economic model.
--Robert Young
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
More information about the tap-l
mailing list