diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-11-03 20:55:01 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-11-03 20:55:01 +0100 |
commit | 877a1dbf7c9cd2901a7f5de175afca1b45df2956 (patch) | |
tree | a93e8302c569efa247c0da7562ac11bd96bc5e36 /tests/test.mew | |
parent | 121afda5a559ed39c42060697fe39e736e3383d9 (diff) | |
download | mew-877a1dbf7c9cd2901a7f5de175afca1b45df2956.tar.gz mew-877a1dbf7c9cd2901a7f5de175afca1b45df2956.tar.xz mew-877a1dbf7c9cd2901a7f5de175afca1b45df2956.zip |
prn: return value of last argument
Hat tip to Tom Lord, who called this `peek`.
Diffstat (limited to 'tests/test.mew')
-rw-r--r-- | tests/test.mew | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test.mew b/tests/test.mew index 82c793a..82a2e71 100644 --- a/tests/test.mew +++ b/tests/test.mew @@ -93,7 +93,8 @@ (test-group "prn" (test "1 2 3\n" (with-output-to-string (fun () (prn 1 2 3)))) (test "\"a\" b #t\n" (with-output-to-string (fun () (prn "a" 'b #t)))) - (test "\n" (with-output-to-string (fun () (prn))))) + (test "\n" (with-output-to-string (fun () (prn)))) + (test 3 (esc ret (with-output-to-string (fun () (ret (prn 1 2 3))))))) (test-group "def" (test "define variable" |