aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test')
-rw-r--r--vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test46
1 files changed, 46 insertions, 0 deletions
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test
new file mode 100644
index 00000000..f5e68456
--- /dev/null
+++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test
@@ -0,0 +1,46 @@
1--TEST--
2Twig supports binary operations (+, -, *, /, ~, %, and, or)
3--TEMPLATE--
4{{ 1 + 1 }}
5{{ 2 - 1 }}
6{{ 2 * 2 }}
7{{ 2 / 2 }}
8{{ 3 % 2 }}
9{{ 1 and 1 }}
10{{ 1 and 0 }}
11{{ 0 and 1 }}
12{{ 0 and 0 }}
13{{ 1 or 1 }}
14{{ 1 or 0 }}
15{{ 0 or 1 }}
16{{ 0 or 0 }}
17{{ 0 or 1 and 0 }}
18{{ 1 or 0 and 1 }}
19{{ "foo" ~ "bar" }}
20{{ foo ~ "bar" }}
21{{ "foo" ~ bar }}
22{{ foo ~ bar }}
23{{ 20 // 7 }}
24--DATA--
25return array('foo' => 'bar', 'bar' => 'foo')
26--EXPECT--
272
281
294
301
311
321
33
34
35
361
371
381
39
40
411
42foobar
43barbar
44foofoo
45barfoo
462