-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ jobs: | |
- uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: '1.11.1.1208' | ||
bb: '1.3.186' | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
|
@@ -53,3 +54,5 @@ jobs: | |
- run: npm install | ||
|
||
- run: npx shadow-cljs compile test && node out/test.js | ||
|
||
- run: bb test/run.bb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{:deps {org.clojure/test.check {:mvn/version "1.1.1"} | ||
com.widdindustries/time-literals {:mvn/version "0.1.10"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(ns me.flowthing.pp-cpp-test) | ||
|
||
;; Dummy namespace to prevent Babashka from running tests that compare | ||
;; the output of clojure.pprint/pprint and me.flowthing.pp/pprint. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(ns me.flowthing.pp-gen-test) | ||
|
||
;; Dummy namespace to prevent Babashka from running Clojure-only | ||
;; generative tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(ns me.flowthing.pp-record-test | ||
(:require [clojure.test :refer [deftest is]] | ||
[me.flowthing.pp.test :refer [pp]])) | ||
|
||
(defrecord R [x]) | ||
(defrecord R?*+! []) | ||
|
||
(deftest print-record | ||
(is (= "#sci.impl.records.SciRecord{:x\n {:a\n 1,\n :b\n 2,\n :c\n 3,\n :d\n 4}}\n" | ||
(pp (->R {:a 1 :b 2 :c 3 :d 4}) :max-width 31))) | ||
(is (= "#sci.impl.records.SciRecord{}\n" | ||
(pp (->R?*+!))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bb | ||
|
||
(require '[clojure.test :as t] | ||
'[babashka.classpath :as cp]) | ||
|
||
(cp/add-classpath "src:test") | ||
|
||
(require 'me.flowthing.pp-test) | ||
(require 'me.flowthing.pp-record-test) | ||
|
||
(def test-results | ||
(t/run-tests 'me.flowthing.pp-test 'me.flowthing.pp-record-test)) | ||
|
||
(let [{:keys [fail error]} test-results] | ||
(when (pos? (+ fail error)) | ||
(System/exit 1))) |