Skip to content

Commit

Permalink
Add tests for get(String, Int, default)
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Jun 24, 2017
1 parent 0aadeaa commit 0aace7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/strings/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ end
@test SubString("", 1, 6)[10:9] == ""
@test SubString("", 1, 0)[10:9] == ""

# issue #22500 (using `get()` to safely index strings)
@test get("Julia", 1, ' ') == 'J'
@test get("Julia", -1, ' ') == ' '
@test get("Julia", 10, ' ') == ' '

#=
# issue #7764
Expand Down

0 comments on commit 0aace7f

Please sign in to comment.