-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #485 from moonbitlang/doc_test
feat: support doc test
- Loading branch information
Showing
22 changed files
with
390 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 @@ | ||
# username/hello |
10 changes: 10 additions & 0 deletions
10
crates/moon/tests/test_cases/run_doc_test.in/moon.mod.json
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,10 @@ | ||
{ | ||
"name": "username/hello", | ||
"version": "0.1.0", | ||
"readme": "README.md", | ||
"repository": "", | ||
"license": "Apache-2.0", | ||
"keywords": [], | ||
"description": "", | ||
"source": "src" | ||
} |
38 changes: 38 additions & 0 deletions
38
crates/moon/tests/test_cases/run_doc_test.in/src/lib/greet.mbt
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,38 @@ | ||
/// ``` | ||
/// println("doc_test 1 from greet.mbt") | ||
/// ``` | ||
pub fn greet1() -> String { | ||
"greet, world!" | ||
} | ||
|
||
|
||
/// ``` | ||
/// println("doc_test 2 from greet.mbt") | ||
/// | ||
/// | ||
/// | ||
/// ``` | ||
pub fn greet2() -> String { | ||
"greet, world!" | ||
} | ||
|
||
/// ``` | ||
/// println("doc_test 3 from greet.mbt") | ||
/// | ||
/// | ||
/// | ||
/// ``` | ||
pub fn greet3() -> String { | ||
"greet, wor1ld!" | ||
} | ||
|
||
/// ``` | ||
/// println("doc_test from greet.mbt") | ||
/// | ||
/// | ||
/// inspect!(423) | ||
/// | ||
/// ``` | ||
pub fn greet() -> String { | ||
"greet, wor1ld!" | ||
} |
Oops, something went wrong.