-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[#237] Modify coloring options
- Loading branch information
Showing
7 changed files
with
89 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bats | ||
|
||
# SPDX-FileCopyrightText: 2023 Serokell <https://serokell.io> | ||
# | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
load '../helpers/bats-support/load' | ||
load '../helpers/bats-assert/load' | ||
load '../helpers/bats-file/load' | ||
load '../helpers' | ||
|
||
# The CI variable must be always explicitly set in these tests because they are checking for an | ||
# intended behavior regardless of where they are actually being run (e.g. "No color flag (not | ||
# in CI)") may be running in CI). | ||
|
||
@test "Color flag (not in CI)" { | ||
CI=false xrefcheck -v --no-progress --color | diff - expected-color.gold | ||
} | ||
|
||
@test "No color flag (not in CI)" { | ||
CI=false xrefcheck -v --no-progress --no-color | diff - expected-no-color.gold | ||
} | ||
|
||
@test "No color default when pipe (not in CI)" { | ||
CI=false xrefcheck -v --no-progress | diff - expected-no-color.gold | ||
} | ||
|
||
@test "Color default when CI" { | ||
CI=true xrefcheck -v --no-progress | diff - expected-color.gold | ||
} | ||
|
||
@test "No color flag in CI" { | ||
CI=true xrefcheck -v --no-progress --no-color | diff - expected-no-color.gold | ||
} |
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,9 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2023 Serokell <https://serokell.io> | ||
- | ||
- SPDX-License-Identifier: MPL-2.0 | ||
--> | ||
|
||
# Color | ||
|
||
[Color](#Color) |
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 @@ | ||
=== Repository data === | ||
|
||
[96mcolor.md[0m: | ||
- references: | ||
- reference ([92mfile-local[0m) [2mat src:9:1-15[0m: | ||
- text: "Color" | ||
- link: - | ||
- anchor: Color | ||
- anchors: | ||
- color ([2m[92mheader I[0m[0m) [2mat src:7:1-7[0m | ||
|
||
All repository links are valid. |
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 @@ | ||
=== Repository data === | ||
|
||
color.md: | ||
- references: | ||
- reference (file-local) at src:9:1-15: | ||
- text: "Color" | ||
- link: - | ||
- anchor: Color | ||
- anchors: | ||
- color (header I) at src:7:1-7 | ||
|
||
All repository links are valid. |