diff --git a/test/strings/basic.jl b/test/strings/basic.jl index bf1fb7741c862d..b4be286c9a50dd 100644 --- a/test/strings/basic.jl +++ b/test/strings/basic.jl @@ -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