diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-03 03:42:41 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-03 03:42:41 -0500 |
| commit | 3a7588e5c5b7718012917b608e2346dc066cecc2 (patch) | |
| tree | aa88655cf4210d5256377ab44ec1915a0bcebcfc /tests | |
| parent | Move builtins to a separate file (diff) | |
| download | cup-3a7588e5c5b7718012917b608e2346dc066cecc2.tar.xz cup-3a7588e5c5b7718012917b608e2346dc066cecc2.zip | |
Remove `putc` intrinsic and replace with `write(fd, buf, size)`
`putc`, `puts`, and `putnum` in `std/common.cup` are now implemented
in terms of the `write()` syscall.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/builtins.sh | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tests/builtins.sh b/tests/builtins.sh index c37cc2e..4628f70 100755 --- a/tests/builtins.sh +++ b/tests/builtins.sh @@ -31,38 +31,3 @@ assert_stdout_text \ "18446744073709551615" echo " OK" - -echo -n "- putc: " -assert_stdout_text \ -"fn main() { - putc(65); -}" \ -"A" - -assert_stdout_text \ -"fn main(a: int) { - let i: int = 65; - for (; i < 65 + 26; i = i + 1) - putc(i); -}" \ -"ABCDEFGHIJKLMNOPQRSTUVWXYZ" - -assert_stdout_text \ -"fn main() { - putc(72); - putc(101); - putc(108); - putc(108); - putc(111); - putc(44); - putc(32); - putc(87); - putc(111); - putc(114); - putc(108); - putc(100); - putc(33); -}" \ -"Hello, World!" - -echo " OK"
\ No newline at end of file |