diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-03-28 19:39:16 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-03-28 19:40:02 -0400 |
commit | 40ddb23b103eb1d29d2aa0ae3e5bc6633bae9c93 (patch) | |
tree | 577223fd5644fb69ad176b54df0d8a3887be2c4e /tests.sh | |
parent | 1d2bdf995af658209f5fb63fc42c825411d8da9e (diff) | |
download | bfs-40ddb23b103eb1d29d2aa0ae3e5bc6633bae9c93.tar.xz |
color: Implement escape sequence parsing
GNU ls allows custom escape sequences inside color values, including
control characters and embedded NULs.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -626,6 +626,8 @@ bfs_tests=( test_color test_color_L + test_color_rs_lc_rc_ec + test_color_escapes test_color_mh test_color_mh0 test_color_or @@ -1847,6 +1849,14 @@ function test_color_L() { LS_COLORS= bfs_diff -L rainbow -color } +function test_color_rs_lc_rc_ec() { + LS_COLORS="rs=RS:lc=LC:rc=RC:ec=EC:" bfs_diff rainbow -color +} + +function test_color_escapes() { + LS_COLORS="lc=\e[:rc=\x6d\::ec=^[[\x6D\0:" bfs_diff rainbow -color +} + function test_color_mh() { LS_COLORS="mh=01:" bfs_diff rainbow -color } |