summaryrefslogtreecommitdiff
path: root/test.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-10-23 00:01:49 +0200
committerKevin Chabowski <kevin@kch42.de>2013-10-23 00:01:49 +0200
commitfc8f7eec23e8e95fc9a4a483bb69a1ee6866069d (patch)
treed7b9510e21e1c188894d821682327f5bfb9e225e /test.php
parent04ee002e30b5451d505ee5abd9c6b97c40da2df0 (diff)
downloadste-fc8f7eec23e8e95fc9a4a483bb69a1ee6866069d.tar.gz
ste-fc8f7eec23e8e95fc9a4a483bb69a1ee6866069d.tar.bz2
ste-fc8f7eec23e8e95fc9a4a483bb69a1ee6866069d.zip
Added some tests
Diffstat (limited to 'test.php')
-rw-r--r--test.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/test.php b/test.php
new file mode 100644
index 0000000..c9a72ed
--- /dev/null
+++ b/test.php
@@ -0,0 +1,18 @@
+<?php
+
+require("stupid_template_engine.php");
+
+$file = file_get_contents("example/templates/src/master.html");
+
+try {
+ $ast = \ste\Parser::parse($file, "master.html");
+} catch(\ste\ParseCompileError $e) {
+ $e->rewrite($file);
+ echo "Could not parse:\n";
+ echo $e->getMessage();
+ echo "\n";
+ exit(1);
+}
+
+echo "~~~~~~~~~~~\n";
+var_dump($ast); \ No newline at end of file