Skip to content

Commit bbeeecf

Browse files
committed
Increase snapshot width
When snapshots are less wide, paths to Windows temp files are shortened by GitUI which results in our custom regex not matching them which in turn means they are not replaced by `[TEMP_FILE]` as they should be. This is relevant on Windows CI.
1 parent 4fda8b6 commit bbeeecf

4 files changed

+34
-34
lines changed

Diff for: src/gitui.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ mod tests {
239239
.unwrap();
240240

241241
let mut terminal =
242-
Terminal::new(TestBackend::new(100, 12)).unwrap();
242+
Terminal::new(TestBackend::new(120, 12)).unwrap();
243243

244244
gitui.draw(&mut terminal).unwrap();
245245

Diff for: src/snapshots/gitui__gitui__tests__app_loading.snap

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ expression: terminal.backend()
44
snapshot_kind: text
55
---
66
" Status [1] | Log [2] | Files [3] | Stashing [4] | Stashes [5][TEMP_FILE] "
7-
" ────────────────────────────────────────────────────────────────────────────────────────────────── "
8-
"┌Unstaged Changes────────────────────────────────┐┌Diff: ──────────────────────────────────────────┐"
9-
"│Loading ... ││"
10-
"││"
11-
"││"
12-
"└────────────────────────────────────────{master}┘│ │"
13-
"┌Staged Changes──────────────────────────────────┐│"
14-
"│Loading ... ││"
15-
"││"
16-
"└────────────────────────────────────────────────┘└────────────────────────────────────────────────┘"
17-
" "
7+
" ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── "
8+
"┌Unstaged Changes──────────────────────────────────────────┐┌Diff: ────────────────────────────────────────────────────┐"
9+
"│Loading ... ││ "
10+
" ││ "
11+
" ││ "
12+
"└──────────────────────────────────────────────────{master}┘│ "
13+
"┌Staged Changes────────────────────────────────────────────┐│ "
14+
"│Loading ... ││ "
15+
" ││ "
16+
"└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘"
17+
" "

Diff for: src/snapshots/gitui__gitui__tests__app_loading_finished.snap

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ expression: terminal.backend()
44
snapshot_kind: text
55
---
66
" Status [1] | Log [2] | Files [3] | Stashing [4] | Stashes [5][TEMP_FILE] "
7-
" ────────────────────────────────────────────────────────────────────────────────────────────────── "
8-
"┌Unstaged Changes────────────────────────────────┐┌Diff: ──────────────────────────────────────────┐"
9-
"││"
10-
"││"
11-
"││"
12-
"└────────────────────────────────────────{master}┘│ │"
13-
"┌Staged Changes──────────────────────────────────┐│"
14-
"││"
15-
"││"
16-
"└────────────────────────────────────────────────┘└────────────────────────────────────────────────┘"
17-
"Branches [b] Push [p] Fetch [⇧F] Pull [f] Undo Commit [⇧U] Submodules [⇧S] Nav [↑↓→←] more [.]"
7+
" ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── "
8+
"┌Unstaged Changes──────────────────────────────────────────┐┌Diff: ────────────────────────────────────────────────────┐"
9+
" ││ "
10+
" ││ "
11+
" ││ "
12+
"└──────────────────────────────────────────────────{master}┘│ "
13+
"┌Staged Changes────────────────────────────────────────────┐│ "
14+
" ││ "
15+
" ││ "
16+
"└──────────────────────────────────────────────────────────┘└──────────────────────────────────────────────────────────┘"
17+
"Branches [b] Push [p] Fetch [⇧F] Pull [f] Undo Commit [⇧U] Submodules [⇧S] Nav [↑↓→←] Diff [→] To stage [w] more [.]"

Diff for: src/snapshots/gitui__gitui__tests__app_log_tab_showing_one_commit.snap

+11-11
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ expression: terminal.backend()
44
snapshot_kind: text
55
---
66
" Status [1] | Log [2] | Files [3] | Stashing [4] | Stashes [5][TEMP_FILE] "
7-
" ────────────────────────────────────────────────────────────────────────────────────────────────── "
8-
"┌Commit 1/1────────────────────────────────────────────────────────────────────────────────────────┐"
9-
"│[AAAAA] <1m ago name initial █"
10-
"│ ║"
11-
"│ ║"
12-
"│ ║"
13-
"│ ║"
14-
"│ ║"
15-
"│ ║"
16-
"└──────────────────────────────────────────────────────────────────────────────────────────────────┘"
17-
"Scroll [↑↓] Mark [˽] Details [⏎] Branches [b] Compare [⇧C] Copy Hash [y] Tag [t] more [.]"
7+
" ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── "
8+
"┌Commit 1/1────────────────────────────────────────────────────────────────────────────────────────────────────────────"
9+
"│[AAAAA] <1m ago name initial "
10+
" "
11+
" "
12+
" "
13+
" "
14+
" "
15+
" "
16+
"└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────"
17+
"Scroll [↑↓] Mark [˽] Details [⏎] Branches [b] Compare [⇧C] Copy Hash [y] Tag [t] Checkout [⇧S] Tags [⇧T] more [.]"

0 commit comments

Comments
 (0)