-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
println!
calls with snapshot tests (#158)
* Add `insta` as a dependency * Replace `println!` tests with snapshot tests * `cargo fmt` * Support true color in CI --------- Co-authored-by: Kurt Lawrence <[email protected]>
- Loading branch information
1 parent
c3dcd33
commit d4da0f4
Showing
9 changed files
with
140 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.snap linguist-language=Text |
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 |
---|---|---|
|
@@ -27,4 +27,5 @@ features = [ | |
|
||
[dev_dependencies] | ||
ansi_term = "0.12" | ||
insta = "1" | ||
rspec = "=1.0.0-beta.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
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: src/customcolors.rs | ||
expression: "\"Greetings from Ukraine\".custom_color(my_color)" | ||
--- | ||
[38;2;0;120;120mGreetings from Ukraine[0m |
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,41 @@ | ||
--- | ||
source: src/lib.rs | ||
expression: buf | ||
--- | ||
[31mtoto[0m | ||
[31mtoto[0m | ||
[34mtoto[0m | ||
blue style **** | ||
[1mtoto[0m | ||
[1;31myeah ! Red bold ![0m | ||
[1;33myeah ! Yellow bold ![0m | ||
[1;34mtoto[0m | ||
[1;34mtoto[0m | ||
[1;4;34mtoto[0m | ||
[3;34mtoto[0m | ||
****** | ||
test clearing | ||
red cleared | ||
bold cyan cleared | ||
****** | ||
Bg tests | ||
[44;32mtoto[0m | ||
[45;33mtoto[0m | ||
[43;35mtoto[0m | ||
[47;35mtoto[0m | ||
[42;36mtoto[0m | ||
[47;30mtoto[0m | ||
****** | ||
[32mtoto[0m | ||
[33mtoto[0m | ||
[35mtoto[0m | ||
[35mtoto[0m | ||
[36mtoto[0m | ||
[37mtoto[0m | ||
[32mtoto[0m | ||
[38;2;255;0;0mtoto[0m | ||
[38;2;255;255;0mtoto[0m | ||
[48;2;0;80;80mtoto[0m | ||
[38;2;255;255;0mtoto[0m | ||
[48;2;0;80;80mtoto[0m | ||
|
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,41 @@ | ||
--- | ||
source: src/lib.rs | ||
expression: buf | ||
--- | ||
toto | ||
toto | ||
toto | ||
blue style **** | ||
toto | ||
yeah ! Red bold ! | ||
yeah ! Yellow bold ! | ||
toto | ||
toto | ||
toto | ||
toto | ||
****** | ||
test clearing | ||
red cleared | ||
bold cyan cleared | ||
****** | ||
Bg tests | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
****** | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
toto | ||
|