diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:57:58 +0000 |
commit | be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch) | |
tree | 9754ff1ca740f6346cf8483ec915d4054bc5da2d /web/server/h2o/libh2o/deps/mruby/test/t/symbol.rb | |
parent | Initial commit. (diff) | |
download | netdata-upstream.tar.xz netdata-upstream.zip |
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/h2o/libh2o/deps/mruby/test/t/symbol.rb')
-rw-r--r-- | web/server/h2o/libh2o/deps/mruby/test/t/symbol.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/web/server/h2o/libh2o/deps/mruby/test/t/symbol.rb b/web/server/h2o/libh2o/deps/mruby/test/t/symbol.rb new file mode 100644 index 00000000..9059f45c --- /dev/null +++ b/web/server/h2o/libh2o/deps/mruby/test/t/symbol.rb @@ -0,0 +1,30 @@ +## +# Symbol ISO Test + +assert('Symbol') do + assert_equal :"a", :a + assert_equal :"a#{1}", :a1 + assert_equal :'a', :a + assert_equal :'a#{1}', :"a\#{1}" +end + +assert('Symbol', '15.2.11') do + assert_equal Class, Symbol.class +end + +assert('Symbol#===', '15.2.11.3.1') do + assert_true :abc == :abc + assert_false :abc == :cba +end + +assert('Symbol#id2name', '15.2.11.3.2') do + assert_equal 'abc', :abc.id2name +end + +assert('Symbol#to_s', '15.2.11.3.3') do + assert_equal 'abc', :abc.to_s +end + +assert('Symbol#to_sym', '15.2.11.3.4') do + assert_equal :abc, :abc.to_sym +end |