Skip to content

Commit c2ea414

Browse files
committed
nasm-t: do not strip newlines from output
Currently we strip newlines from files on read and write procedures for better diff output, but as being pointed by hpa@ this makes quite inconvenient to work with tests in a manual mode. Thus lets left outputs as is. We have to update all tests with template outputs since by default output streams are ending with newline. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
1 parent 2f8a50d commit c2ea414

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+56
-55
lines changed

travis/nasm-t.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117

118118
def read_stdfile(path):
119119
with open(path, "rb") as f:
120-
data = f.read().decode("utf-8").strip("\n")
120+
data = f.read().decode("utf-8")
121121
f.close()
122122
return data
123123

@@ -297,8 +297,8 @@ def show_diff(test, patha, pathb):
297297
pb = run_hexdump(pathb)
298298
if pa == None or pb == None:
299299
return test_fail(test, "Can't create dumps")
300-
sa = pa.stdout.read().decode("utf-8").strip("\n")
301-
sb = pb.stdout.read().decode("utf-8").strip("\n")
300+
sa = pa.stdout.read().decode("utf-8")
301+
sb = pb.stdout.read().decode("utf-8")
302302
print("\t--- hexdump %s" % (patha))
303303
for i in sa.split("\n"):
304304
print("\t%s" % i)
@@ -364,8 +364,8 @@ def exec_nasm(desc):
364364
#
365365
# FIXME: For now 4M buffer is enough but
366366
# better provide reading in a cycle.
367-
stderr = pnasm.stderr.read(4194304).decode("utf-8").strip("\n")
368-
stdout = pnasm.stdout.read(4194304).decode("utf-8").strip("\n")
367+
stderr = pnasm.stderr.read(4194304).decode("utf-8")
368+
stdout = pnasm.stdout.read(4194304).decode("utf-8")
369369

370370
pnasm.stdout.close()
371371
pnasm.stderr.close()

travis/test/_version.stdout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
NASM version 2.15rc0 compiled on Nov 3 2018
1+
NASM version 2.15.05 compiled on Sep 17 2020

travis/test/addr64x.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
./travis/test/addr64x.asm:5: warning: byte data exceeds bounds [-w+number-overflow]
22
./travis/test/addr64x.asm:5: warning: byte data exceeds bounds [-w+number-overflow]
33
./travis/test/addr64x.asm:6: warning: byte data exceeds bounds [-w+number-overflow]
4-
./travis/test/addr64x.asm:6: warning: byte data exceeds bounds [-w+number-overflow]
4+
./travis/test/addr64x.asm:6: warning: byte data exceeds bounds [-w+number-overflow]

travis/test/align13.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
./travis/test/align13.asm:7: error: segment alignment `13' is not power of two
22
./travis/test/align13.asm:10: error: segment alignment `13' is not power of two
33
./travis/test/align13.asm:13: error: segment alignment `13' is not power of two
4-
./travis/test/align13.asm:14: error: segment alignment `13' is not power of two
4+
./travis/test/align13.asm:14: error: segment alignment `13' is not power of two

travis/test/align13s.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
./travis/test/align13s.asm:9: error: segment alignment `13' is not power of two
22
./travis/test/align13s.asm:12: error: segment alignment `13' is not power of two
3-
./travis/test/align13s.asm:15: error: segment alignment `13' is not power of two
3+
./travis/test/align13s.asm:15: error: segment alignment `13' is not power of two

travis/test/aoutso.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
./travis/test/aoutso.asm:79: warning: label alone on a line without a colon might be in error [-w+label-orphan]
1+
./travis/test/aoutso.asm:79: warning: label alone on a line without a colon might be in error [-w+label-orphan]

travis/test/bcd.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
./travis/test/bcd.asm:9: warning: packed BCD truncated to 18 digits [-w+other]
2-
./travis/test/bcd.asm:20: warning: packed BCD truncated to 18 digits [-w+other]
2+
./travis/test/bcd.asm:20: warning: packed BCD truncated to 18 digits [-w+other]

travis/test/br2222615.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
./travis/test/br2222615.asm:14: error: `%ifnmacro' expects a macro name
1+
./travis/test/br2222615.asm:14: error: `%ifnmacro' expects a macro name

travis/test/br2496848.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
./travis/test/br2496848.asm:38: warning: byte data exceeds bounds [-w+number-overflow]
2323
./travis/test/br2496848.asm:38: warning: byte data exceeds bounds [-w+number-overflow]
2424
./travis/test/br2496848.asm:39: warning: byte data exceeds bounds [-w+number-overflow]
25-
./travis/test/br2496848.asm:39: warning: byte data exceeds bounds [-w+number-overflow]
25+
./travis/test/br2496848.asm:39: warning: byte data exceeds bounds [-w+number-overflow]

travis/test/br3041451.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
./travis/test/br3041451.asm:17: warning: negative `%rep' count: -2 [-w+negative-rep]
22
./travis/test/br3041451.asm:28: warning: negative `%rep' count: -1 [-w+negative-rep]
33
./travis/test/br3041451.asm:39: warning: negative `%rep' count: -2 [-w+negative-rep]
4-
./travis/test/br3041451.asm:50: warning: negative `%rep' count: -1 [-w+negative-rep]
4+
./travis/test/br3041451.asm:50: warning: negative `%rep' count: -1 [-w+negative-rep]

0 commit comments

Comments
 (0)