-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#237] Modify coloring options #268
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think this format is just the best ))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah 😆, as you may have seen in the commit history, I was trying to store this in a textual representation of the output's binary data, but encountered a lot of problems, mainly:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, that sounds like a sufferring 😋