Skip to content
This repository was archived by the owner on Sep 20, 2022. It is now read-only.

Commit a348fcc

Browse files
author
Nathan Smith
committed
more tests
1 parent d125970 commit a348fcc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/runtests.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,25 @@ end
1313

1414
# Test for \n in first line issue
1515
@test isdefined() == true
16+
17+
# Test that the poodle function doesn't error out
18+
@pygen "
19+
function 🐩()
20+
yield \"🐩\"
21+
end
22+
"
23+
24+
@test isdefined(:🐩) == true
25+
26+
# Test that one of these generators actually works
27+
@pygen """
28+
function squares(n)
29+
i = 0
30+
while i <= n
31+
yield i^2
32+
i += 1
33+
end
34+
end
35+
"""
36+
37+
@test sum(squares(10)) == sum(i^2 for i in 1:10)

0 commit comments

Comments
 (0)