| 1 |
# How to update the internal database |
| 2 |
|
| 3 |
Create the test fixtures by writing the output of the GNU dircolors commands to the fixtures folder: |
| 4 |
|
| 5 |
```shell |
| 6 |
dircolors --print-database > /PATH_TO_COREUTILS/tests/fixtures/dircolors/internal.expected |
| 7 |
dircolors --print-ls-colors > /PATH_TO_COREUTILS/tests/fixtures/dircolors/ls_colors.expected |
| 8 |
dircolors -b > /PATH_TO_COREUTILS/tests/fixtures/dircolors/bash_def.expected |
| 9 |
dircolors -c > /PATH_TO_COREUTILS/tests/fixtures/dircolors/csh_def.expected |
| 10 |
``` |
| 11 |
|
| 12 |
Run the tests: |
| 13 |
|
| 14 |
```shell |
| 15 |
cargo test --features "dircolors" --no-default-features |
| 16 |
``` |
| 17 |
|
| 18 |
Edit `/PATH_TO_COREUTILS/src/uu/dircolors/src/dircolors.rs` until the tests pass. |