mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-10 07:20:02 +00:00
8a743a598b
Currently we only append a newline to 'actual' if 'expected' (as loaded from file) already ends in a newline, but that results in inconsistent behavior. For example, some of the test files used by virhostcputest are newline-terminated and some aren't. If we were to remove existing newlines from those files or add them where they aren't present, the test would still pass, and even using VIR_TEST_REGENERATE_OUTPUT=1 wouldn't change them back. Make things consistent by ensuring that 'actual' is always newline-terminated. The only exception is when 'actual' is completely empty: in that case, we want the file to be actually empty, not contain a single empty line. query-jobs-empty.result in qemumonitorjsondata/ is an example of this being used. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2 lines
295 B
Plaintext
2 lines
295 B
Plaintext
IBM/S390, version = 00, identification = 145F07, machine = 2964, facilities: 0 1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 40 41 42 43 44 45 46 47 48 49 50 51 52 53 55 57 64 65 66 67 68 69 70 71 72 73 75 76 77 78 80 128 129 131 132 142 143
|