- name: make
run: make
- name: run tests
- run: ./runtests.sh
+ run: ./bin/test
**/*.o
*.o
tags
-test.c
-test
*.wasm
*.html
session.vim
INCLUDES=-I./include
LIBS=
-TARGET=./onyx
+TARGET=./bin/onyx
# These aren't working yet
INSTALL_FOLDER=/usr/share/onyx
--- /dev/null
+#!/bin/sh
+
+failed=0
+for test_file in ./tests/*.onyx ; do
+ filename=$(basename -- "$test_file")
+ name="${filename%.*}"
+
+ echo "⏲ Checking $name.onyx"
+
+ if ! ./bin/onyx "$test_file" -o "./tests/$name.wasm" >/dev/null; then
+ echo "❌ Failed to compile $name.onyx."
+ failed=1
+ continue
+ fi
+
+ if ! node onyxcmd.js "./tests/$name.wasm" > ./tmpoutput; then
+ echo "❌ Failed to run $name.onyx."
+ failed=1
+ continue
+ fi
+
+ if ! diff ./tmpoutput "./tests/$name" >/dev/null; then
+ echo "❌ Test output did not match."
+ diff ./tmpoutput "./tests/$name"
+ # failed=0
+ continue
+ fi
+
+ rm "./tests/$name.wasm"
+done
+rm ./tmpoutput
+
+([ $failed = 0 ] && echo "✔ All tests passed.") \
+ || echo "❌ Some tests failed."
+
+exit $failed
+
[ ] Make README on GitHub better, and actually describe what to do
[ ] Make compiler work on Windows
[ ] Make compiler work on MacOS
+ [ ] Make Onyx easier to use from JS
[ ] Add examples for the following language features:
- Slices
- Dynamic Arrays
+++ /dev/null
-#!/bin/sh
-
-failed=0
-for test_file in ./tests/*.onyx ; do
- filename=$(basename -- "$test_file")
- name="${filename%.*}"
-
- echo "⏲ Checking $name.onyx"
-
- if ! ./onyx "$test_file" -o "./tests/$name.wasm" >/dev/null; then
- echo "❌ Failed to compile $name.onyx."
- failed=1
- continue
- fi
-
- if ! node onyxcmd.js "./tests/$name.wasm" > ./tmpoutput; then
- echo "❌ Failed to run $name.onyx."
- failed=1
- continue
- fi
-
- if ! diff ./tmpoutput "./tests/$name" >/dev/null; then
- echo "❌ Test output did not match."
- diff ./tmpoutput "./tests/$name"
- # failed=0
- continue
- fi
-
- rm "./tests/$name.wasm"
-done
-rm ./tmpoutput
-
-([ $failed = 0 ] && echo "✔ All tests passed.") \
- || echo "❌ Some tests failed."
-
-exit $failed
\ No newline at end of file