From ec91a77c83da28c97b06a3d33a5e534cb62b6eb0 Mon Sep 17 00:00:00 2001 From: Jesse Bouwman Date: Thu, 24 Oct 2024 15:13:48 -0700 Subject: [PATCH] test failures in CI --- .github/workflows/ci.yml | 2 +- Makefile | 2 ++ coalton-mode.asd | 1 + tests/json-tests.lisp | 45 +--------------------------------------- 4 files changed, 5 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7735c0b..2215cdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: name: ${{matrix.lisp}} on ${{matrix.os}} strategy: matrix: - lisp: [allegro, ccl-bin, sbcl-bin] + lisp: [sbcl-bin] # only one cool lisp os: [ubuntu-latest] fail-fast: false runs-on: ${{matrix.os}} diff --git a/Makefile b/Makefile index ee1fb9e..d73373d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# Run unit tests, failing on the first error + .PHONY: test test: sbcl --noinform --non-interactive \ diff --git a/coalton-mode.asd b/coalton-mode.asd index 71cd0ad..401d289 100644 --- a/coalton-mode.asd +++ b/coalton-mode.asd @@ -31,6 +31,7 @@ :serial t :components ((:file "package") (:file "mock") + (:file "json-tests") (:file "lsp-tests") (:file "message-tests") (:file "protocol-tests") diff --git a/tests/json-tests.lisp b/tests/json-tests.lisp index 78f01d0..ecd2c0f 100644 --- a/tests/json-tests.lisp +++ b/tests/json-tests.lisp @@ -4,47 +4,4 @@ (is (equalp (cm::decode-json "{\"key\": \"value\"}") - '(("key" . "value")))) - (is (equalp (cm::decode-json - "{\"key\": [\"value\"]}") - '(("key" . #("value"))))) - (is (equalp (cm::decode-json - "{\"key\": [{\"key\": \"value\"}]}") - '(("key" . ((("key" . "value"))))))) - - (is (equalp (cm::decode-json - (cm::to-json - (cm::make-diagnostic 5 4 5 8 - "'x' is undefined" - "undefined-export"))) - '(("range" - ("start" - ("line" . 5) - ("character" . 4)) - ("end" - ("line" . 5) - ("character" . 8))) - ("severity" . 2) - ("code" . "undefined-export") - ("source" . "coalton") - ("message" . "'x' is undefined")))) - - (is (equalp (cm::decode-json - (cm::to-json - (mock-publish-diagnostics))) - '(("jsonrpc" . "2.0") - ("method" . "textDocument/publishDiagnostics") - ("params" - ("uri" . "file:///Users/jbouwman/git/coalton-mode/resources/fib.coal") - ("diagnostics" - (("range" - ("start" - ("line" . 5) - ("character" . 4)) - ("end" - ("line" . 5) - ("character" . 8))) - ("severity" . 2) - ("code" . "undefined-export") - ("source" . "coalton") - ("message" . "export: 'fiib' is undefined")))))))) + '(("key" . "valuezorkxS!")))))