test/ft_3_equals.rb in openwferu-0.9.15 vs test/ft_3_equals.rb in openwferu-0.9.16
- old
+ new
@@ -18,73 +18,73 @@
#def teardown
#end
def test_equals_0
- dotest(\
+ dotest(
'''<process-definition name="equals_0" revision="0">
<sequence>
<equals value="a" other-value="a" />
<print>${field:__result__}</print>
</sequence>
</process-definition>''', "true")
end
def test_equals_1
- dotest(\
+ dotest(
'''<process-definition name="equals_1" revision="0">
<sequence>
<equals value="a" other-value="b" />
<print>${field:__result__}</print>
</sequence>
</process-definition>''', "false")
end
def test_if_0
- dotest(\
+ dotest(
'''<process-definition name="if_0" revision="0">
<if>
<equals value="a" other-value="a" />
<print>ok</print>
</if>
</process-definition>''', "ok")
end
def test_if_1
- dotest(\
+ dotest(
'''<process-definition name="if_1" revision="0">
<if>
<equals value="a" other-value="a" />
<print>ok</print>
<print>nok</print>
</if>
</process-definition>''', "ok")
end
def test_if_2
- dotest(\
+ dotest(
'''<process-definition name="if_2" revision="0">
<if>
<equals value="a" other-value="b" />
<print>nok</print>
</if>
</process-definition>''', "")
end
def test_if_3
- dotest(\
+ dotest(
'''<process-definition name="if_3" revision="0">
<if>
<equals value="a" other-value="b" />
<print>nok</print>
<print>ok</print>
</if>
</process-definition>''', "ok")
end
def test_equals_0
- dotest(\
+ dotest(
'<process-definition name="'+name_of_test+'''" revision="0">
<sequence>
<set field="a" value="true" />
<print>${f:a}</print>
<if>
@@ -133,32 +133,37 @@
true
""".strip)
end
def test_equals_3
+
+ #log_level_to_debug
+
dotest(
'<process-definition name="'+name_of_test+'''" revision="0">
<sequence>
<if test="3 > 2">
- <print>ok</print>
+ <print>ok0</print>
</if>
<if test="3 > a">
<print>bad</print>
- <print>ok</print>
+ <print>ok1</print>
</if>
<if test="3>a">
<print>bad</print>
- <print>ok</print>
+ <print>ok2</print>
</if>
<if test="3 > 2">
- <print>ok</print>
+ <print>ok3</print>
+ <print>bad</print>
</if>
<if test="1 < 2.0">
- <print>ok</print>
+ <print>ok4</print>
+ <print>bad</print>
</if>
</sequence>
</process-definition>''',
- ("ok\n" * 5).strip)
+ (0..4).collect { |i| "ok#{i}" }.join("\n"))
end
end