-
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.
templates: align attributes in builtin_log_detailed
Change-Id: Id00000003feb0508bf7f08e0a0275ba7f7695b70
- Loading branch information
Showing
5 changed files
with
67 additions
and
68 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 |
---|---|---|
|
@@ -142,10 +142,10 @@ fn test_backout_multiple() { | |
"###); | ||
// View the output of each backed out commit | ||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@+"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
insta::assert_snapshot!(stdout, @r#" | ||
Commit ID: 8ff3fbc2ccb0d66985f558c461d1643cebb4c7d6 | ||
Change ID: wqnwkozpkustnxypnnntnykwrqrkrpvv | ||
Author: Test User <[email protected]> (2001-02-03 08:05:19) | ||
Author : Test User <[email protected]> (2001-02-03 08:05:19) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:19) | ||
Back out "e" | ||
|
@@ -156,12 +156,12 @@ fn test_backout_multiple() { | |
1 1: a | ||
2 2: b | ||
3 : c | ||
"###); | ||
"#); | ||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@++"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
insta::assert_snapshot!(stdout, @r#" | ||
Commit ID: d31d42e0267f6524d445348b1dd00926c62a6b57 | ||
Change ID: mouksmquosnpvwqrpsvvxtxpywpnxlss | ||
Author: Test User <[email protected]> (2001-02-03 08:05:19) | ||
Author : Test User <[email protected]> (2001-02-03 08:05:19) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:19) | ||
Back out "c" | ||
|
@@ -170,12 +170,12 @@ fn test_backout_multiple() { | |
Removed regular file b: | ||
1 : b | ||
"###); | ||
"#); | ||
let stdout = test_env.jj_cmd_success(&repo_path, &["show", "@+++"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
insta::assert_snapshot!(stdout, @r#" | ||
Commit ID: 6504c4ded177fba2334f76683d1aa643700d5073 | ||
Change ID: tqvpomtpwrqsylrpsxknultrymmqxmxv | ||
Author: Test User <[email protected]> (2001-02-03 08:05:19) | ||
Author : Test User <[email protected]> (2001-02-03 08:05:19) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:19) | ||
Back out "b" | ||
|
@@ -185,7 +185,7 @@ fn test_backout_multiple() { | |
Modified regular file a: | ||
1 1: a | ||
2 : b | ||
"###); | ||
"#); | ||
} | ||
|
||
fn get_log_output(test_env: &TestEnvironment, cwd: &Path) -> String { | ||
|
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 |
---|---|---|
|
@@ -316,31 +316,31 @@ fn test_log_builtin_templates() { | |
[EOF] | ||
"###); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" | ||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#" | ||
Commit ID: dc31539712c7294d1d712cec63cef4504b94ca74 | ||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp | ||
Bookmarks: my-bookmark | ||
Author: (no name set) <(no email set)> (2001-02-03 08:05:08) | ||
Author : (no name set) <(no email set)> (2001-02-03 08:05:08) | ||
Committer: (no name set) <(no email set)> (2001-02-03 08:05:08) | ||
(no description set) | ||
Commit ID: 230dd059e1b059aefc0da06a2e5a7dbf22362f22 | ||
Change ID: qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu | ||
Author: Test User <[email protected]> (2001-02-03 08:05:07) | ||
Author : Test User <[email protected]> (2001-02-03 08:05:07) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:07) | ||
(no description set) | ||
Commit ID: 0000000000000000000000000000000000000000 | ||
Change ID: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | ||
Author: (no name set) <(no email set)> (1970-01-01 11:00:00) | ||
Author : (no name set) <(no email set)> (1970-01-01 11:00:00) | ||
Committer: (no name set) <(no email set)> (1970-01-01 11:00:00) | ||
(no description set) | ||
[EOF] | ||
"###); | ||
"#); | ||
} | ||
|
||
#[test] | ||
|
@@ -386,30 +386,29 @@ fn test_log_builtin_templates_colored() { | |
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" | ||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r#" | ||
[1m[38;5;2m@[0m Commit ID: [38;5;4mdc31539712c7294d1d712cec63cef4504b94ca74[39m | ||
│ Change ID: [38;5;5mrlvkpnrzqnoowoytxnquwvuryrwnrmlp[39m | ||
│ Bookmarks: [38;5;5mmy-bookmark[39m | ||
│ Author: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m2001-02-03 08:05:08[39m) | ||
│ Author : [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m2001-02-03 08:05:08[39m) | ||
│ Committer: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m2001-02-03 08:05:08[39m) | ||
│ | ||
│ [38;5;2m (no description set)[39m | ||
│ | ||
○ Commit ID: [38;5;4m230dd059e1b059aefc0da06a2e5a7dbf22362f22[39m | ||
│ Change ID: [38;5;5mqpvuntsmwlqtpsluzzsnyyzlmlwvmlnu[39m | ||
│ Author: [38;5;3mTest User[39m <[38;5;[email protected][39m> ([38;5;6m2001-02-03 08:05:07[39m) | ||
│ Author : [38;5;3mTest User[39m <[38;5;[email protected][39m> ([38;5;6m2001-02-03 08:05:07[39m) | ||
│ Committer: [38;5;3mTest User[39m <[38;5;[email protected][39m> ([38;5;6m2001-02-03 08:05:07[39m) | ||
│ | ||
│ [38;5;2m (no description set)[39m | ||
│ | ||
[1m[38;5;14m◆[0m Commit ID: [38;5;4m0000000000000000000000000000000000000000[39m | ||
Change ID: [38;5;5mzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz[39m | ||
Author: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m1970-01-01 11:00:00[39m) | ||
Author : [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m1970-01-01 11:00:00[39m) | ||
Committer: [38;5;1m(no name set)[39m <[38;5;1m(no email set)[39m> ([38;5;6m1970-01-01 11:00:00[39m) | ||
[38;5;2m (no description set)[39m | ||
"###); | ||
"#); | ||
} | ||
|
||
#[test] | ||
|
@@ -455,30 +454,30 @@ fn test_log_builtin_templates_colored_debug() { | |
<<log::>> | ||
"#); | ||
|
||
insta::assert_snapshot!(render(r#"builtin_log_detailed"#), @r###" | ||
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::>> | ||
│ <<log::Change ID: >>[38;5;5m<<log change_id::rlvkpnrzqnoowoytxnquwvuryrwnrmlp>>[39m<<log::>> | ||
│ <<log::Bookmarks: >>[38;5;5m<<log local_bookmarks name::my-bookmark>>[39m<<log::>> | ||
│ <<log::Author: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:08>>[39m<<log::)>> | ||
│ <<log::Author : >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:08>>[39m<<log::)>> | ||
│ <<log::Committer: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:08>>[39m<<log::)>> | ||
│ <<log::>> | ||
│ [38;5;2m<<log empty description placeholder:: (no description set)>>[39m<<log::>> | ||
│ <<log::>> | ||
<<node::○>> <<log::Commit ID: >>[38;5;4m<<log commit_id::230dd059e1b059aefc0da06a2e5a7dbf22362f22>>[39m<<log::>> | ||
│ <<log::Change ID: >>[38;5;5m<<log change_id::qpvuntsmwlqtpsluzzsnyyzlmlwvmlnu>>[39m<<log::>> | ||
│ <<log::Author: >>[38;5;3m<<log author name::Test User>>[39m<<log:: <>>[38;5;3m<<log author email::[email protected]>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>> | ||
│ <<log::Author : >>[38;5;3m<<log author name::Test User>>[39m<<log:: <>>[38;5;3m<<log author email::[email protected]>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>> | ||
│ <<log::Committer: >>[38;5;3m<<log committer name::Test User>>[39m<<log:: <>>[38;5;3m<<log committer email::[email protected]>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::2001-02-03 08:05:07>>[39m<<log::)>> | ||
│ <<log::>> | ||
│ [38;5;2m<<log empty description placeholder:: (no description set)>>[39m<<log::>> | ||
│ <<log::>> | ||
[1m[38;5;14m<<node immutable::◆>>[0m <<log::Commit ID: >>[38;5;4m<<log commit_id::0000000000000000000000000000000000000000>>[39m<<log::>> | ||
<<log::Change ID: >>[38;5;5m<<log change_id::zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz>>[39m<<log::>> | ||
<<log::Author: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::1970-01-01 11:00:00>>[39m<<log::)>> | ||
<<log::Author : >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log author timestamp local format::1970-01-01 11:00:00>>[39m<<log::)>> | ||
<<log::Committer: >>[38;5;1m<<log name placeholder::(no name set)>>[39m<<log:: <>>[38;5;1m<<log email placeholder::(no email set)>>[39m<<log::> (>>[38;5;6m<<log committer timestamp local format::1970-01-01 11:00:00>>[39m<<log::)>> | ||
<<log::>> | ||
[38;5;2m<<log empty description placeholder:: (no description set)>>[39m<<log::>> | ||
<<log::>> | ||
"###); | ||
"#); | ||
} | ||
|
||
#[test] | ||
|
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 |
---|---|---|
|
@@ -2086,10 +2086,10 @@ fn test_diff_external_tool() { | |
"###); | ||
|
||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["show", "--tool=fake-diff-editor"]), @r###" | ||
test_env.jj_cmd_success(&repo_path, &["show", "--tool=fake-diff-editor"]), @r#" | ||
Commit ID: 39d9055d70873099fd924b9af218289d5663eac8 | ||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp | ||
Author: Test User <[email protected]> (2001-02-03 08:05:09) | ||
Author : Test User <[email protected]> (2001-02-03 08:05:09) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:09) | ||
(no description set) | ||
|
@@ -2099,7 +2099,7 @@ fn test_diff_external_tool() { | |
-- | ||
file2 | ||
file3 | ||
"###); | ||
"#); | ||
|
||
// Enabled by default, looks up the merge-tools table | ||
let config = "--config-toml=ui.diff.tool='fake-diff-editor'"; | ||
|
@@ -2133,16 +2133,16 @@ fn test_diff_external_tool() { | |
// Non-zero exit code isn't an error | ||
std::fs::write(&edit_script, "print diff\0fail").unwrap(); | ||
let (stdout, stderr) = test_env.jj_cmd_ok(&repo_path, &["show", "--tool=fake-diff-editor"]); | ||
insta::assert_snapshot!(stdout, @r###" | ||
insta::assert_snapshot!(stdout, @r#" | ||
Commit ID: 39d9055d70873099fd924b9af218289d5663eac8 | ||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp | ||
Author: Test User <[email protected]> (2001-02-03 08:05:09) | ||
Author : Test User <[email protected]> (2001-02-03 08:05:09) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:09) | ||
(no description set) | ||
diff | ||
"###); | ||
"#); | ||
insta::assert_snapshot!(stderr.replace("exit code:", "exit status:"), @r###" | ||
Warning: Tool exited with exit status: 1 (run with --debug to see the exact invocation) | ||
"###); | ||
|
@@ -2237,10 +2237,10 @@ fn test_diff_external_file_by_file_tool() { | |
"###); | ||
|
||
insta::assert_snapshot!( | ||
test_env.jj_cmd_success(&repo_path, &["show", config]), @r###" | ||
test_env.jj_cmd_success(&repo_path, &["show", config]), @r#" | ||
Commit ID: 7b01704a670bc77d11ed117d362855cff1d4513b | ||
Change ID: rlvkpnrzqnoowoytxnquwvuryrwnrmlp | ||
Author: Test User <[email protected]> (2001-02-03 08:05:09) | ||
Author : Test User <[email protected]> (2001-02-03 08:05:09) | ||
Committer: Test User <[email protected]> (2001-02-03 08:05:09) | ||
(no description set) | ||
|
@@ -2257,7 +2257,7 @@ fn test_diff_external_file_by_file_tool() { | |
file1 | ||
-- | ||
file4 | ||
"###); | ||
"#); | ||
} | ||
|
||
#[cfg(unix)] | ||
|
Oops, something went wrong.