mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
dircolors: patch test fixture to include alacritty support
This commit is contained in:
parent
4f422c1a3a
commit
f0b7d322d1
3 changed files with 20 additions and 1 deletions
|
@ -9,10 +9,16 @@ dircolors -b > /PATH_TO_COREUTILS/tests/fixtures/dircolors/bash_def.expected
|
||||||
dircolors -c > /PATH_TO_COREUTILS/tests/fixtures/dircolors/csh_def.expected
|
dircolors -c > /PATH_TO_COREUTILS/tests/fixtures/dircolors/csh_def.expected
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Apply the patches to include more terminals that support colors:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git apply /PATH_TO_COREUTILS/src/uu/dircolors/alacritty-supports-colors.patch
|
||||||
|
```
|
||||||
|
|
||||||
Run the tests:
|
Run the tests:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cargo test --features "dircolors" --no-default-features
|
cargo test --features "dircolors" --no-default-features
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit `/PATH_TO_COREUTILS/src/uu/dircolors/src/colors.rs` until the tests pass.
|
Edit `/PATH_TO_COREUTILS/src/uu/dircolors/src/dircolors.rs` until the tests pass.
|
||||||
|
|
12
src/uu/dircolors/alacritty-supports-colors.patch
Normal file
12
src/uu/dircolors/alacritty-supports-colors.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/tests/fixtures/dircolors/internal.expected b/tests/fixtures/dircolors/internal.expected
|
||||||
|
index e151973f2..01dae4273 100644
|
||||||
|
--- a/tests/fixtures/dircolors/internal.expected
|
||||||
|
+++ b/tests/fixtures/dircolors/internal.expected
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
# restrict following config to systems with matching environment variables.
|
||||||
|
COLORTERM ?*
|
||||||
|
TERM Eterm
|
||||||
|
+TERM alacritty*
|
||||||
|
TERM ansi
|
||||||
|
TERM *color*
|
||||||
|
TERM con[0-9]*x[0-9]*
|
1
tests/fixtures/dircolors/internal.expected
vendored
1
tests/fixtures/dircolors/internal.expected
vendored
|
@ -7,6 +7,7 @@
|
||||||
# restrict following config to systems with matching environment variables.
|
# restrict following config to systems with matching environment variables.
|
||||||
COLORTERM ?*
|
COLORTERM ?*
|
||||||
TERM Eterm
|
TERM Eterm
|
||||||
|
TERM alacritty*
|
||||||
TERM ansi
|
TERM ansi
|
||||||
TERM *color*
|
TERM *color*
|
||||||
TERM con[0-9]*x[0-9]*
|
TERM con[0-9]*x[0-9]*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue