Commit 57cee93
committed
While fixing the ValuesPreserved test:
• Fix TMAGIC = "ustar " into TMAGIC = "ustar". It was meant to denote that this value should include a trailing NULL char, but actually the constant were authored with a space not NULL, so the NULL were never written, and the meaning space were written as is. Functions which checked for this value failed because they expected a 5-char word and got 6-char.
• GetAsciiBytes might be requested to write more chars than there are in the string, make sure these are written as NULLs (would be correctly ignored when reading), unlike whatever trash might be there in the buffer).
• Update HeaderEquality test, it were setting magic to the well-known "ustar" value and expecting to see a diff. But the entry is set to "ustar" by default. This test used to pass because the default "ustar" had a trailing space which made it another string. Set to smth which is really different now.1 parent 2ef1706 commit 57cee93
2 files changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
899 | 899 | | |
900 | 900 | | |
901 | 901 | | |
902 | | - | |
| 902 | + | |
| 903 | + | |
903 | 904 | | |
904 | 905 | | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
905 | 909 | | |
906 | 910 | | |
907 | 911 | | |
| |||
0 commit comments