-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: fix missed working-copy "bookmark" colors
Quoting style changed because of insta v1.40.0.
- Loading branch information
Showing
2 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,23 +198,23 @@ fn test_log_default() { | |
|
||
// Color | ||
let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
[1m[38;5;2m@[0m [1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;[email protected][39m [38;5;14m2001-02-03 08:05:09[39m [38;5;5mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m | ||
insta::assert_snapshot!(stdout, @r#" | ||
[1m[38;5;2m@[0m [1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;[email protected][39m [38;5;14m2001-02-03 08:05:09[39m [38;5;13mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m | ||
│ [1m[38;5;10m(empty)[39m description 1[0m | ||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;[email protected][39m [38;5;6m2001-02-03 08:05:08[39m [1m[38;5;4ma[0m[38;5;8ma2015d7[39m | ||
│ add a file | ||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m | ||
"###); | ||
"#); | ||
|
||
// Color without graph | ||
let stdout = test_env.jj_cmd_success(&repo_path, &["log", "--color=always", "--no-graph"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
[1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;[email protected][39m [38;5;14m2001-02-03 08:05:09[39m [38;5;5mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m | ||
insta::assert_snapshot!(stdout, @r#" | ||
[1m[38;5;13mk[38;5;8mkmpptxz[39m [38;5;[email protected][39m [38;5;14m2001-02-03 08:05:09[39m [38;5;13mmy-bookmark[39m [38;5;12mb[38;5;8mac9ff9e[39m[0m | ||
[1m[38;5;10m(empty)[39m description 1[0m | ||
[1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;[email protected][39m [38;5;6m2001-02-03 08:05:08[39m [1m[38;5;4ma[0m[38;5;8ma2015d7[39m | ||
add a file | ||
[1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m | ||
"###); | ||
"#); | ||
} | ||
|
||
#[test] | ||
|
@@ -310,30 +310,30 @@ fn test_log_builtin_templates_colored() { | |
); | ||
test_env.jj_cmd_ok(&repo_path, &["bookmark", "create", "my-bookmark"]); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r###" | ||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;5mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m [38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m | ||
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#" | ||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;13mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m [38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m | ||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;3mtest.user[39m [38;5;6m2001-02-03 08:05:07[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m [38;5;2m(empty)[39m [38;5;2m(no description set)[39m | ||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m | ||
"###); | ||
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###" | ||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;5mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m | ||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#" | ||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;13mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m | ||
│ [1m[38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m | ||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;[email protected][39m [38;5;6m2001-02-03 08:05:07[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m | ||
│ [38;5;2m(empty)[39m [38;5;2m(no description set)[39m | ||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m | ||
"###); | ||
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###" | ||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;5mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m | ||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#" | ||
[1m[38;5;2m@[0m [1m[38;5;13mr[38;5;8mlvkpnrz[39m [38;5;9m(no email set)[39m [38;5;14m2001-02-03 08:05:08[39m [38;5;13mmy-bookmark[39m [38;5;12md[38;5;8mc315397[39m[0m | ||
│ [1m[38;5;10m(empty)[39m [38;5;10m(no description set)[39m[0m | ||
│ | ||
○ [1m[38;5;5mq[0m[38;5;8mpvuntsm[39m [38;5;[email protected][39m [38;5;6m2001-02-03 08:05:07[39m [1m[38;5;4m2[0m[38;5;8m30dd059[39m | ||
│ [38;5;2m(empty)[39m [38;5;2m(no description set)[39m | ||
│ | ||
[1m[38;5;14m◆[0m [1m[38;5;5mz[0m[38;5;8mzzzzzzz[39m [38;5;2mroot()[39m [1m[38;5;4m0[0m[38;5;8m0000000[39m | ||
"###); | ||
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" | ||
[1m[38;5;2m@[0m Commit ID: [38;5;4mdc31539712c7294d1d712cec63cef4504b94ca74[39m | ||
|
@@ -379,30 +379,30 @@ fn test_log_builtin_templates_colored_debug() { | |
); | ||
test_env.jj_cmd_ok(&repo_path, &["bookmark", "create", "my-bookmark"]); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r###" | ||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;5m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m | ||
insta::assert_snapshot!(render(r#"builtin_log_oneline"#), @r#" | ||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;13m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m | ||
<<node::○>> [1m[38;5;5m<<log change_id shortest prefix::q>>[0m[38;5;8m<<log change_id shortest rest::pvuntsm>>[39m<<log:: >>[38;5;3m<<log author username::test.user>>[39m<<log:: >>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::2>>[0m[38;5;8m<<log commit_id shortest rest::30dd059>>[39m<<log:: >>[38;5;2m<<log empty::(empty)>>[39m<<log:: >>[38;5;2m<<log empty description placeholder::(no description set)>>[39m<<log::>> | ||
[1m[38;5;14m<<node immutable::◆>>[0m [1m[38;5;5m<<log change_id shortest prefix::z>>[0m[38;5;8m<<log change_id shortest rest::zzzzzzz>>[39m<<log:: >>[38;5;2m<<log root::root()>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::0>>[0m[38;5;8m<<log commit_id shortest rest::0000000>>[39m<<log::>> | ||
"###); | ||
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r###" | ||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;5m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m | ||
insta::assert_snapshot!(render(r#"builtin_log_compact"#), @r#" | ||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;13m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m | ||
│ [1m[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m | ||
<<node::○>> [1m[38;5;5m<<log change_id shortest prefix::q>>[0m[38;5;8m<<log change_id shortest rest::pvuntsm>>[39m<<log:: >>[38;5;3m<<log author email::[email protected]>>[39m<<log:: >>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::2>>[0m[38;5;8m<<log commit_id shortest rest::30dd059>>[39m<<log::>> | ||
│ [38;5;2m<<log empty::(empty)>>[39m<<log:: >>[38;5;2m<<log empty description placeholder::(no description set)>>[39m<<log::>> | ||
[1m[38;5;14m<<node immutable::◆>>[0m [1m[38;5;5m<<log change_id shortest prefix::z>>[0m[38;5;8m<<log change_id shortest rest::zzzzzzz>>[39m<<log:: >>[38;5;2m<<log root::root()>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::0>>[0m[38;5;8m<<log commit_id shortest rest::0000000>>[39m<<log::>> | ||
"###); | ||
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r###" | ||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;5m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m | ||
insta::assert_snapshot!(render(r#"builtin_log_comfortable"#), @r#" | ||
[1m[38;5;2m<<node working_copy::@>>[0m [1m[38;5;13m<<log working_copy change_id shortest prefix::r>>[38;5;8m<<log working_copy change_id shortest rest::lvkpnrz>>[39m<<log working_copy:: >>[38;5;9m<<log working_copy email placeholder::(no email set)>>[39m<<log working_copy:: >>[38;5;14m<<log working_copy committer timestamp local format::2001-02-03 08:05:08>>[39m<<log working_copy:: >>[38;5;13m<<log working_copy bookmarks name::my-bookmark>>[39m<<log working_copy:: >>[38;5;12m<<log working_copy commit_id shortest prefix::d>>[38;5;8m<<log working_copy commit_id shortest rest::c315397>>[39m<<log working_copy::>>[0m | ||
│ [1m[38;5;10m<<log working_copy empty::(empty)>>[39m<<log working_copy:: >>[38;5;10m<<log working_copy empty description placeholder::(no description set)>>[39m<<log working_copy::>>[0m | ||
│ <<log::>> | ||
<<node::○>> [1m[38;5;5m<<log change_id shortest prefix::q>>[0m[38;5;8m<<log change_id shortest rest::pvuntsm>>[39m<<log:: >>[38;5;3m<<log author email::[email protected]>>[39m<<log:: >>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::2>>[0m[38;5;8m<<log commit_id shortest rest::30dd059>>[39m<<log::>> | ||
│ [38;5;2m<<log empty::(empty)>>[39m<<log:: >>[38;5;2m<<log empty description placeholder::(no description set)>>[39m<<log::>> | ||
│ <<log::>> | ||
[1m[38;5;14m<<node immutable::◆>>[0m [1m[38;5;5m<<log change_id shortest prefix::z>>[0m[38;5;8m<<log change_id shortest rest::zzzzzzz>>[39m<<log:: >>[38;5;2m<<log root::root()>>[39m<<log:: >>[1m[38;5;4m<<log commit_id shortest prefix::0>>[0m[38;5;8m<<log commit_id shortest rest::0000000>>[39m<<log::>> | ||
<<log::>> | ||
"###); | ||
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" | ||
[1m[38;5;2m<<node working_copy::@>>[0m <<log::Commit ID: >>[38;5;4m<<log commit_id::dc31539712c7294d1d712cec63cef4504b94ca74>>[39m<<log::>> | ||
|