From 4c6c0f3a8591a76eee85465639908da46c22e9d7 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Thu, 9 Nov 2023 10:50:44 -0800 Subject: [PATCH] build slightly more robust testing framework --- .github/workflows/build.yaml | 4 ++-- tests/query.wake | 10 ++++++++++ tests/test.sh | 5 +++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 tests/query.wake create mode 100755 tests/test.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ef8d414..b36dead 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,5 +28,5 @@ jobs: - name: Check formatting run: wake-format --dry-run --auto - - name: Run basic test - run: wake --in query -x 'single 5' + - name: Run tests + run: ./tests/test.sh diff --git a/tests/query.wake b/tests/query.wake new file mode 100644 index 0000000..a40502b --- /dev/null +++ b/tests/query.wake @@ -0,0 +1,10 @@ +package tests + +from wake import _ +from query import _ + +export def runQueryTests _ = + require 4, Nil = single 4 + else failWithError "Unexpected value for single" + + Pass Unit diff --git a/tests/test.sh b/tests/test.sh new file mode 100755 index 0000000..69f96de --- /dev/null +++ b/tests/test.sh @@ -0,0 +1,5 @@ +#! /bin/bash + +set -e + +wake --in tests runQueryTests