Apart from the schema annotation (
https://github.com/xspec/xspec/blob/3d9c0801410472e06d710f94204823bd269ca05b/src/schemas/xspec.rnc#L141-L153
), Jeni's presentation is the only explanation I've found so far. I hope
someone documents the feature:
https://github.com/xspec/xspec/issues/477
I guess x:like is helpful, for example, in these cases:
- when you invoke your tested component repeatedly
<x:scenario label="call my template with lots of parameters"
shared="yes">
<x:call template="my-template">
<x:param name="p1" select="..." />
<x:param name="p2" select="..." />
...
</x:call>
</x:scenario>
<x:scenario label="with context-A">
<x:context>context-A</x:context>
<x:like label="call my template with lots of parameters" />
<x:expect label="expect something suitable for context-A"
select="..." />
</x:scenario>
<x:scenario label="with context-B">
<x:context>context-B</x:context>
<x:like label="call my template with lots of parameters" />
<x:expect label="expect something suitable for context-B"
select="..." />
</x:scenario>
- when you expect some common things
<x:scenario label="expect some common things" shared="yes">
<x:expect label="a common expectation" select="..." />
<x:expect label="another common expectation" select="..." />
...
</x:scenario>
<x:scenario label="with context-A">
<x:context>context-A</x:context>
<x:like label="expect some common things"/>
<x:expect label="expect something specific to context A"
select="..." />
</x:scenario>
<x:scenario label="with context-B">
<x:context>context-B</x:context>
<x:like label="expect some common things" />
<x:expect label="expect something specific to context-B"
select="..." />
</x:scenario>
--
AirQuick
>
https://groups.google.com/d/msgid/xspec-users/eba9b9f9-0dd4-4b04-81dd-c1599887f857n%40googlegroups.com.