Yaffs site version 1.1
[yaffs-website] / vendor / twig / twig / test / Twig / Tests / Fixtures / expressions / ends_with.test
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test
new file mode 100644 (file)
index 0000000..9ad5e5e
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--
+Twig supports the "ends with" operator
+--TEMPLATE--
+{{ 'foo' ends with 'o' ? 'OK' : 'KO' }}
+{{ not ('foo' ends with 'f') ? 'OK' : 'KO' }}
+{{ not ('foo' ends with 'foowaytoolong') ? 'OK' : 'KO' }}
+{{ 'foo' ends with '' ? 'OK' : 'KO' }}
+{{ '1' ends with true ? 'OK' : 'KO' }}
+{{ 1 ends with true ? 'OK' : 'KO' }}
+{{ 0 ends with false ? 'OK' : 'KO' }}
+{{ '' ends with false ? 'OK' : 'KO' }}
+{{ false ends with false ? 'OK' : 'KO' }}
+{{ false ends with '' ? 'OK' : 'KO' }}
+--DATA--
+return array()
+--EXPECT--
+OK
+OK
+OK
+OK
+KO
+KO
+KO
+KO
+KO
+KO