Skip to content

Commit

Permalink
tests: add color to byte diffs in failure scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang committed Jun 6, 2024
1 parent 4917638 commit 18aaf92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/test_helpers/fixtures/create_blob_failure
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Debug = true
[stage-3] Git object file doesn't match official Git implementation. Diff after zlib decompression:
[stage-3] 
[stage-3] Expected (bytes 0-52), hexadecimal: | ASCII:
[stage-3] 62 6c 6f 62 20 34 34 00 6f 72 61 6e 67 65 20 70 65 61 72 20 | blob 44.orange pear
[stage-3] 62 6c 6f 62 20 34 34 00 6f 72 61 6e 67 65 20 70 65 61 72 20 | blob 44.orange pear
[stage-3] 67 72 61 70 65 20 70 69 6e 65 61 70 70 6c 65 20 62 6c 75 65 | grape pineapple blue
[stage-3] 62 65 72 72 79 20 62 61 6e 61 6e 61 | berry banana
[stage-3] 
[stage-3] Actual (bytes 0-52), hexadecimal: | ASCII:
[stage-3] 62 6c 6f 62 34 34 00 6f 72 61 6e 67 65 20 70 65 61 72 20 67 | blob44.orange pear g
[stage-3] 62 6c 6f 62 34 34 00 6f 72 61 6e 67 65 20 70 65 61 72 20 67 | blob44.orange pear g
[stage-3] 72 61 70 65 20 70 69 6e 65 61 70 70 6c 65 20 62 6c 75 65 62 | rape pineapple blueb
[stage-3] 65 72 72 79 20 62 61 6e 61 6e 61 | erry banana
[stage-3] 
Expand Down
4 changes: 2 additions & 2 deletions internal/test_helpers/fixtures/write_tree_fail
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Debug = true
[stage-5] Git object file doesn't match official Git implementation. Diff after zlib decompression:
[stage-5] 
[stage-5] Expected (bytes 0-100), hexadecimal: | ASCII:
[stage-5] 74 72 65 65 20 31 30 30 00 31 30 30 36 34 34 20 68 6f 72 73 | tree 100.100644 hors
[stage-5] 74 72 65 65 20 31 30 30 00 31 30 30 36 34 34 20 68 6f 72 73 | tree 100.100644 hors
[stage-5] 65 79 00 b3 bb b4 97 51 ee 2c 31 b7 c5 e1 24 06 5d 0f 38 1b | ey.....Q.,1...$.].8.
[stage-5] fe 7a ff 34 30 30 30 30 20 68 75 6d 70 74 79 00 39 b2 e8 c1 | .z.40000 humpty.9...
[stage-5] 14 4b ba dd 5e a5 a0 d0 85 9c 16 7b 6b fc 73 08 34 30 30 30 | .K..^......{k.s.4000
[stage-5] 30 20 6d 6f 6e 6b 65 79 00 a1 e1 d3 c8 39 8b 89 b3 09 92 17 | 0 monkey.....9......
[stage-5] 
[stage-5] Actual (bytes 0-100), hexadecimal: | ASCII:
[stage-5] 74 72 65 65 20 31 30 32 00 31 30 30 36 34 34 20 68 6f 72 73 | tree 102.100644 hors
[stage-5] 74 72 65 65 20 31 30 32 00 31 30 30 36 34 34 20 68 6f 72 73 | tree 102.100644 hors
[stage-5] 65 79 00 b3 bb b4 97 51 ee 2c 31 b7 c5 e1 24 06 5d 0f 38 1b | ey.....Q.,1...$.].8.
[stage-5] fe 7a ff 30 34 30 30 30 30 20 68 75 6d 70 74 79 00 39 b2 e8 | .z.040000 humpty.9..
[stage-5] c1 14 4b ba dd 5e a5 a0 d0 85 9c 16 7b 6b fc 73 08 30 34 30 | ..K..^......{k.s.040
Expand Down

0 comments on commit 18aaf92

Please sign in to comment.