mrubyedge 2.1.2

mruby/edge is yet another mruby that is specialized for running on WASM
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
##
# mrb_sys_fail with no SystemCallError

assert('mrb_sys_fail without SystemCallError') do
  # With mruby-errno the errno goes to SystemCallError and none of this
  # applies. The core test state has no gems, so the tests below hold, but
  # say what they depend on rather than assume it.
  skip 'SystemCallError is defined' if TestSysFail::SYSTEM_CALL_ERROR_DEFINED

  e = assert_raise(RuntimeError) { TestSysFail.fail(2) }
  assert_equal 'errno: 2', e.message

  e = assert_raise(RuntimeError) { TestSysFail.fail(2, 'wilma') }
  assert_equal 'errno: 2 - wilma', e.message
end