Skip to content

Commit 98a4943

Browse files
committed
Add truffle spec until Joni is fixed
1 parent 67a903b commit 98a4943

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spec/truffle/regexp_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. This
2+
# code is released under a tri EPL/GPL/LGPL license. You can use it,
3+
# redistribute it and/or modify it under the terms of the:
4+
#
5+
# Eclipse Public License version 2.0, or
6+
# GNU General Public License version 2, or
7+
# GNU Lesser General Public License version 2.1.
8+
9+
require_relative '../ruby/spec_helper'
10+
11+
describe "Regexp" do
12+
it "raise a RegexpError and not a fatal error when it fails to parse in Joni" do
13+
# On MRI this actually does not raise, but we need to fix Joni first for that
14+
-> { Regexp.new("\\p{") }.should raise_error(RegexpError)
15+
end
16+
end

0 commit comments

Comments
 (0)