Skip to content

Commit 5aec112

Browse files
committed
add test cases for #6139 and #6128
1 parent cd03a8a commit 5aec112

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

doc/stdlib/punctuation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Extended documentation for mathematical symbols & functions is :ref:`here <mathe
1111
``!`` prefix "not" operator
1212
``a!( )`` at the end of a function name, `!` indicates that a function modifies its argument(s)
1313
``#`` begin single line comment
14-
``#=`` begin multi-line comment
14+
``#=`` begin multi-line comment (these are nestable)
1515
``=#`` end multi-line comment
1616
``$`` xor operator, string and expression interpolation
1717
``%`` remainder operator

test/core.jl

+5
Original file line numberDiff line numberDiff line change
@@ -1454,3 +1454,8 @@ x6074 = 6074
14541454
test5536(a::Union(Real, AbstractArray)...) = "Splatting"
14551455
test5536(a::Union(Real, AbstractArray)) = "Non-splatting"
14561456
@test test5536(5) == "Non-splatting"
1457+
1458+
# multiline comments (#6139 and others raised in #6128)
1459+
@test 3 == include_string("1 + #=# 2") == include_string("1 + #==# 2") == include_string("1 + #===# 2") == include_string("1 + #= #= blah =# =# 2") == include_string("1 + #= #= #= nested =# =# =# 2")
1460+
@test_throws include_string("#=")
1461+
@test_throws include_string("#= #= #= =# =# =")

0 commit comments

Comments
 (0)