Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add U::String#dup tests

  • Loading branch information...
commit 53050ef39a10528487cf1af5805fb4b0da7b9825 1 parent af1aa28
Nikolai Weibull authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/unit/u/string.rb
7 test/unit/u/string.rb
View
@@ -9,6 +9,13 @@
expect 'äbc' do U::String.new('äbc'.encode(Encoding::ISO8859_1)).to_str end
expect Encoding::UndefinedConversionError do U::String.new('äbc'.encode(Encoding::ASCII_8BIT)) end
end
+ expect result.tainted? do 'u'.taint.u end
+ expect result.untrusted? do 'u'.untrust.u end
+
+ expect ''.u do ''.u.dup end
+ expect false do a = ''.u; a.dup.object_id == a.object_id end
+ expect result.tainted? do 'u'.u.taint.dup end
+ expect result.untrusted? do 'u'.u.untrust.dup end
expect true do 'äbc'.u.valid_encoding? end
expect true do "äbc\0def".u.valid_encoding? end
Please sign in to comment.
Something went wrong with that request. Please try again.