Skip to content

Commit

Permalink
Merge branch 'main' of github.com:luc-tielen/eclair-lang
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-tielen committed Oct 1, 2023
2 parents b54a9b4 + 9f573ed commit 9cc839e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
docker build -f Dockerfile . -t eclair:$TIMESTAMP | tee eclair-lang-${{matrix.os}}.log
docker run --rm eclair:$TIMESTAMP bash -c "make test" | tee -a eclair-lang-${{matrix.os}}.log
- name: Check for disabled tests
run: |
./tests/check.sh
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
Expand Down
17 changes: 17 additions & 0 deletions tests/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

grep -rE "(fdescribe|fit)" tests/eclair

if [ "$?" == "0" ]; then
echo "Found disabled tests (marked with fdescribe / fit), aborting!"
exit 1
fi

grep -rE "pending" tests/eclair/Test
if [ "$?" == "0" ]; then
echo "Found pending tests, aborting!"
exit 1
fi

echo "All tests are enabled!"
exit 0
5 changes: 4 additions & 1 deletion tests/eclair/Test/Eclair/LSP/HandlersSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ documentHighlightSpec = describe "Document highlight action" $ do

diagnosticsSpec :: Spec
diagnosticsSpec = describe "Diagnostics action" $ parallel $ do
it "reports nothing if file is OK" pending
it "reports nothing if file is OK" $ do
let file = fixture "hover.eclair"
DiagnosticsOk diags <- withLSP (Just file) $ diagnosticsHandler file
length diags `shouldBe` 0

it "reports invalid syntax" $ do
let file = fixture "invalid_syntax.eclair"
Expand Down
6 changes: 3 additions & 3 deletions tests/eclair/fixtures/lsp/hover.eclair
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@def edge(u32, u32).
@def reachable(u32, u32).
@def literal(string).
@def edge(u32, u32) input.
@def reachable(u32, u32) output.
@def literal(string) output.

reachable(x, y) :-
edge(x, y).
Expand Down

0 comments on commit 9cc839e

Please sign in to comment.