Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-04 10:46:02 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-09-11 09:30:51 -0400
commit8d46b38f252cd6c28764996e2b908116e35c508b (patch)
treed7020254119f42742a2ce95e7b92e57e133860cc
parentc5a6ddf11110ed40e00f82eb990e1760789cabdc (diff)
downloadtame-8d46b38f252cd6c28764996e2b908116e35c508b.tar.gz
tame-8d46b38f252cd6c28764996e2b908116e35c508b.tar.bz2
tame-8d46b38f252cd6c28764996e2b908116e35c508b.zip
Add _match-result_/@eq@
* test/spec.xml (_match-result_)[@eq@]: Add param.
-rw-r--r--core/test/spec.xml25
1 files changed, 19 insertions, 6 deletions
diff --git a/core/test/spec.xml b/core/test/spec.xml
index 00247e3..8a7cff7 100644
--- a/core/test/spec.xml
+++ b/core/test/spec.xml
@@ -2,7 +2,7 @@
<!--
BDD specification framework
- Copyright (C) 2015 R-T Specialty, LLC.
+ Copyright (C) 2015, 2018 R-T Specialty, LLC.
This file is part of tame-core.
@@ -48,6 +48,7 @@
-->
<package xmlns="http://www.lovullo.com/rater"
xmlns:t="http://www.lovullo.com/rater/apply-template"
+ xmlns:c="http://www.lovullo.com/calc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.lovullo.com/rater ../../rater.xsd"
@@ -322,20 +323,32 @@
<!-- choose one -->
<param name="@value@" desc="Match value" />
+ <param name="@eq@" desc="Match equality" />
<param name="@anyOf@" desc="Match against domain of type" />
<if name="@value@">
<match on="@__given_id@" index="@index@" value="@value@" />
</if>
+
<unless name="@value@">
- <if name="@anyOf@">
- <match on="@__given_id@" index="@index@" anyOf="@anyOf@" />
- </if>
- <unless name="@anyOf@">
+ <if name="@eq@">
<match on="@__given_id@" index="@index@">
- <param-copy name="@values@" />
+ <c:eq>
+ <c:value-of name="#{@eq@}" />
+ </c:eq>
</match>
+ </if>
+
+ <unless name="@eq@">
+ <if name="@anyOf@">
+ <match on="@__given_id@" index="@index@" anyOf="@anyOf@" />
+ </if>
+ <unless name="@anyOf@">
+ <match on="@__given_id@" index="@index@">
+ <param-copy name="@values@" />
+ </match>
+ </unless>
</unless>
</unless>
</template>