Skip to content

Commit f0b7d32

Browse files
BuriedInTheGroundsylvestre
authored andcommitted
dircolors: patch test fixture to include alacritty support
1 parent 4f422c1 commit f0b7d32

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/uu/dircolors/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ dircolors -b > /PATH_TO_COREUTILS/tests/fixtures/dircolors/bash_def.expected
99
dircolors -c > /PATH_TO_COREUTILS/tests/fixtures/dircolors/csh_def.expected
1010
```
1111

12+
Apply the patches to include more terminals that support colors:
13+
14+
```shell
15+
git apply /PATH_TO_COREUTILS/src/uu/dircolors/alacritty-supports-colors.patch
16+
```
17+
1218
Run the tests:
1319

1420
```shell
1521
cargo test --features "dircolors" --no-default-features
1622
```
1723

18-
Edit `/PATH_TO_COREUTILS/src/uu/dircolors/src/colors.rs` until the tests pass.
24+
Edit `/PATH_TO_COREUTILS/src/uu/dircolors/src/dircolors.rs` until the tests pass.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/tests/fixtures/dircolors/internal.expected b/tests/fixtures/dircolors/internal.expected
2+
index e151973f2..01dae4273 100644
3+
--- a/tests/fixtures/dircolors/internal.expected
4+
+++ b/tests/fixtures/dircolors/internal.expected
5+
@@ -7,6 +7,7 @@
6+
# restrict following config to systems with matching environment variables.
7+
COLORTERM ?*
8+
TERM Eterm
9+
+TERM alacritty*
10+
TERM ansi
11+
TERM *color*
12+
TERM con[0-9]*x[0-9]*

tests/fixtures/dircolors/internal.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# restrict following config to systems with matching environment variables.
88
COLORTERM ?*
99
TERM Eterm
10+
TERM alacritty*
1011
TERM ansi
1112
TERM *color*
1213
TERM con[0-9]*x[0-9]*

0 commit comments

Comments
 (0)