Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ascii tests #10066

Merged
merged 1 commit into from
Feb 4, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add ascii tests
  • Loading branch information
catawbasam committed Feb 4, 2015
commit 6a75fee60745f6ad98ab7d69b65f0e2cc0c3df26
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("*")=="*"