summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tasks/mrbgem_spec.rake1
-rw-r--r--test/t/unicode.rb25
2 files changed, 1 insertions, 25 deletions
diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake
index 5adba5fed..3536594d9 100644
--- a/tasks/mrbgem_spec.rake
+++ b/tasks/mrbgem_spec.rake
@@ -94,6 +94,7 @@ module MRuby
compilers.each do |compiler|
compiler.define_rules build_dir, "#{dir}"
+ compiler.defines << %Q[MRBGEM_#{funcname.upcase}_VERSION=#{version}]
end
define_gem_init_builder
diff --git a/test/t/unicode.rb b/test/t/unicode.rb
index a8e8c0e14..7edd65ef2 100644
--- a/test/t/unicode.rb
+++ b/test/t/unicode.rb
@@ -33,28 +33,3 @@ assert('braced \u notation test') do
assert_equal("\u{10000}", "\xF0\x90\x80\x80")
assert_equal("\u{10FFFF}", "\xF4\x8F\xBF\xBF")
end
-
-# Test regular expressions only if implemented
-begin
- Regexp
- have_regexp = true
-rescue NameError
- have_regexp = false
-end
-if have_regexp then
- assert('Testing \u in regular expressions') do
- # The regular expression uses the unbraced notation where the string uses
- # the braced notation, and vice versa, so these tests will fail if the \u
- # modification is not applied
-
- # Test of unbraced \u notation in a regular expression
- assert_false(/\u0300/ =~ "\u{02FF}")
- assert_true( /\u0300/ =~ "\u{0300}")
- assert_false(/\u0300/ =~ "\u{0301}")
-
- # Test of braced \u notation in a regular expression
- assert_false(/\u{0300}/ =~ "\u02FF")
- assert_true( /\u{0300}/ =~ "\u0300")
- assert_false(/\u{0300}/ =~ "\u0301")
- end
-end