-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests can now be generated from a header-less doc (#26)
Fixed the summary report not accounting for the fact a doc might have no headers (aka section titles) in it. While this is an unlikely scenario for real docs, it is a likely one for someone wanting to give test-doc-blocks a whirl with a very minimal doc. Closes #25
- Loading branch information
Showing
11 changed files
with
45 additions
and
4 deletions.
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 @@ | ||
[source,clojure] | ||
---- | ||
(+ 1 2) | ||
;; => 3 | ||
---- |
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 @@ | ||
```clojure | ||
(+ 1 2) | ||
;; => 3 | ||
``` |
11 changes: 11 additions & 0 deletions
11
test-resources/expected/test-doc-blocks/test/minimal_adoc_test.cljc
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,11 @@ | ||
(ns minimal-adoc-test | ||
(:require clojure.test | ||
clojure.string | ||
#?(:cljs [lread.test-doc-blocks.runtime :include-macros]) | ||
#?(:clj lread.test-doc-blocks.runtime))) | ||
|
||
(clojure.test/deftest block-0001 | ||
(clojure.test/testing "test-resources/doc/minimal.adoc - line 2" | ||
(clojure.test/is (= '3 (+ 1 2))))) | ||
|
||
(defn test-ns-hook [] (block-0001)) |
11 changes: 11 additions & 0 deletions
11
test-resources/expected/test-doc-blocks/test/minimal_md_test.cljc
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,11 @@ | ||
(ns minimal-md-test | ||
(:require clojure.test | ||
clojure.string | ||
#?(:cljs [lread.test-doc-blocks.runtime :include-macros]) | ||
#?(:clj lread.test-doc-blocks.runtime))) | ||
|
||
(clojure.test/deftest block-0001 | ||
(clojure.test/testing "test-resources/doc/minimal.md - line 1" | ||
(clojure.test/is (= '3 (+ 1 2))))) | ||
|
||
(defn test-ns-hook [] (block-0001)) |
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