crashappsec / libcon4m

Base Compiler and Runtime Support for con4m
Apache License 2.0
0 stars 0 forks source link

Add basic test for printing variable and list #45

Closed ee7 closed 3 weeks ago

ee7 commented 3 weeks ago

Add a test for

x = 1
l = [2]
print(x)
print(l)

that as of 9e41c6cd27e400a6ffe422c1af5e320d9329330f, produces incorrect behavior locally:

$ c4test ../tests/basic20.c4m
FAIL: test /foo/libcon4m/tests/basic20.c4m: output mismatch.
Expected output
1
[2]
Actual
118800407190880
[2]

This test is a simplification of basic11.c4m, to isolate the incorrect behavior there.

Refs: https://github.com/crashappsec/libcon4m/issues/41#issuecomment-2186159881

ee7 commented 3 weeks ago

This test was added by https://github.com/crashappsec/libcon4m/commit/ef01bc96030ac80c622beb24e403b648d0d9ded6 (#49).