Ensure CRLF line endings are preserved when necessary

Some test cases need CRLF line endings checked out even on Unix.
Also some source files had inadvertently contained CR bytes.
This commit is contained in:
Rangi
2026-05-25 21:06:42 -04:00
parent 55db252a8f
commit 996469ee28
10 changed files with 328 additions and 313 deletions
+4
View File
@@ -0,0 +1,4 @@
# Some files test CRLF line endings
character-escapes.out -text diff
crlf.asm text eol=crlf
string-literal-macro-arg.out -text diff
+11 -2
View File
@@ -8,6 +8,15 @@ assert !strcmp("{s}", "Hello, world!")
* block comment
*/
DEF t EQUS """Hello,
REPT 2
REDEF t EQUS """Hello,
world!"""
assert !strcmp("{t}", "Hello,\nworld!")
assert !strcmp("{t}", "Hello,\nworld!")
ENDR
MACRO m
assert "\1" === "Hello, world!"
ENDM
m Hello\, \
world!
+24 -24
View File
@@ -1,24 +1,24 @@
MACRO compare
print "\3: "
if _NARG == 4
def v1 = \3(\4q\1, \1)
def v2 = \3(\4q\2, \2)
elif _NARG == 5
def v1 = \3(\4q\1, \5q\1, \1)
def v2 = \3(\4q\2, \5q\2, \2)
endc
println "{.4q\1f:v1} == {.4q\2f:v2}"
ENDM
compare 8, 16, mul, 6.0, 7.0
compare 12, 24, div, 115.625, 9.25
compare 7, 14, pow, 3.5, 5.5
compare 4, 8, sin, 0.25
compare 5, 9, cos, 0.75
compare 6, 10, asin, 1.0
compare 7, 11, acos, 0.0
compare 3, 6, round, 1.75
compare 10, 20, ceil, 123.4
compare 13, 17, floor, 567.8
MACRO compare
print "\3: "
if _NARG == 4
def v1 = \3(\4q\1, \1)
def v2 = \3(\4q\2, \2)
elif _NARG == 5
def v1 = \3(\4q\1, \5q\1, \1)
def v2 = \3(\4q\2, \5q\2, \2)
endc
println "{.4q\1f:v1} == {.4q\2f:v2}"
ENDM
compare 8, 16, mul, 6.0, 7.0
compare 12, 24, div, 115.625, 9.25
compare 7, 14, pow, 3.5, 5.5
compare 4, 8, sin, 0.25
compare 5, 9, cos, 0.75
compare 6, 10, asin, 1.0
compare 7, 11, acos, 0.0
compare 3, 6, round, 1.75
compare 10, 20, ceil, 123.4
compare 13, 17, floor, 567.8
+2 -2
View File
@@ -1,2 +1,2 @@
SECTION UNION "wat", ROM0
db 42
SECTION UNION "wat", ROM0
db 42