File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
crates/nu-cli/tests/commands Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,23 @@ fn nu_highlight_where_row_condition() {
1111 let actual = nu ! ( "'ls | where a b 12345(' | nu-highlight | ansi strip" ) ;
1212 assert_eq ! ( actual. out, "ls | where a b 12345(" ) ;
1313}
14+
15+ #[ test]
16+ fn nu_highlight_aliased_external_resolved ( ) {
17+ let actual = nu ! ( r#"$env.config.highlight_resolved_externals = true
18+ $env.config.color_config.shape_external_resolved = '#ffffff'
19+ alias fff = ^sleep
20+ ('fff' | nu-highlight | split row (ansi reset) | get 0) has (ansi $env.config.color_config.shape_external_resolved)"# ) ;
21+
22+ assert_eq ! ( actual. out, "true" ) ;
23+ }
24+
25+ #[ test]
26+ fn nu_highlight_aliased_external_unresolved ( ) {
27+ let actual = nu ! ( r#"$env.config.highlight_resolved_externals = true
28+ $env.config.color_config.shape_external = '#ffffff'
29+ alias fff = ^nonexist
30+ ('fff' | nu-highlight | split row (ansi reset) | get 0) has (ansi $env.config.color_config.shape_external)"# ) ;
31+
32+ assert_eq ! ( actual. out, "true" ) ;
33+ }
You can’t perform that action at this time.
0 commit comments