Skip to content

Commit

Permalink
add ascii tests
Browse files Browse the repository at this point in the history
  • Loading branch information
catawbasam committed Feb 4, 2015
1 parent 8cf8cfc commit 6a75fee
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/strings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1316,4 +1316,21 @@ end
@test_throws ArgumentError float64(split("0,1 X\n",","))[2]
@test float32("1\n") == 1.0
@test float32(split("0,1\n",","))[2] == 1.0
@test_throws ArgumentError float32(split("0,1 X\n",","))[2]
@test_throws ArgumentError float32(split("0,1 X\n",","))[2]

#more ascii tests
@test convert(ASCIIString, UInt8[32,107,75], "*") == " kK"
@test convert(ASCIIString, UInt8[132,107,75], "*") == "*kK"
@test convert(ASCIIString, UInt8[], "*") == ""
@test convert(ASCIIString, UInt8[255], "*") == "*"

@test ucfirst("Hola")=="Hola"
@test ucfirst("hola")=="Hola"
@test ucfirst("")==""
@test ucfirst("*")=="*"

@test lcfirst("Hola")=="hola"
@test lcfirst("hola")=="hola"
@test lcfirst("")==""
@test lcfirst("*")=="*"

0 comments on commit 6a75fee

Please sign in to comment.