Add ./o.sh test procedure which compiles pitree with itself to test with ./n.sh
authorNick Downing <nick@ndcode.org>
Sat, 26 Jan 2019 13:22:19 +0000 (00:22 +1100)
committerNick Downing <nick@ndcode.org>
Sat, 26 Jan 2019 13:22:19 +0000 (00:22 +1100)
.gitignore
o.sh [new file with mode: 0755]

index 168724a..935392f 100644 (file)
@@ -1,5 +1,8 @@
 __pycache__
+/ast.py.ok
+/ast.py.new
 /lex_yy.py
 /out
+/pitree.t
 /tests
 /y_tab.py
diff --git a/o.sh b/o.sh
new file mode 100755 (executable)
index 0000000..d3c5b61
--- /dev/null
+++ b/o.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+sed -e "s/^['{]/                                                &/" <ast.py |\
+./ast_to_pitree.py |\
+sed -e "s/^                                         *//" >pitree.t
+./expected.sh ast.py pitree.t >ast.py.ok
+./pitree.py --python -o ast.py.new pitree.t
+diff -q ast.py.ok ast.py.new
+.