Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
crisptrutski committed May 23, 2024
1 parent 234b7d4 commit b548b04
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .clj-kondo/config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

:refer
{:level :warning
:exclude [clojure.test]}
:exclude [clojure.test
macaw.test.util]}

:docstring-leading-trailing-whitespace {:level :warning}
:keyword-binding {:level :warning}
Expand Down
3 changes: 1 addition & 2 deletions test/macaw/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
(:require
[clojure.test :refer [deftest is testing]]
[macaw.core :as m]
#_{:clj-kondo/ignore [:refer]}
[macaw.test-utils :refer [ws=]]
[macaw.test.util :refer [ws=]]
[macaw.walk :as mw])
(:import
(net.sf.jsqlparser.schema Table)))
Expand Down
2 changes: 1 addition & 1 deletion test/macaw/test_utils.clj → test/macaw/test/util.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns macaw.test-utils
(ns macaw.test.util
(:require
[clojure.string :as str]
[clojure.test :refer :all]
Expand Down
24 changes: 24 additions & 0 deletions test/macaw/test/util_test.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(ns macaw.test.util-test
(:require
[clojure.string :as str]
[clojure.test :refer :all]
[macaw.test.util :refer [ws=]]))

(deftest ^:parallel ws=-test
(testing "Code indentation is ignored"
(is (ws= "ABC
DEF
XXX"
(str/replace "ABC
DEF
GHI"
"GHI" "XXX"))))

(testing "Comparison is still whitespace sensitive"
(is (not (ws= "A B" "A B")))
(is (not (ws= "A
B
C"
"A
B
C")))))

0 comments on commit b548b04

Please sign in to comment.