summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/test
AgeCommit message (Collapse)Author
2019-09-26Use type predicate macros instead of `mrb_type` if possibleKOBAYASHI Shuji
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`).
2019-09-14Replace `String#byteslice` by custom `IO._bufread`.Yukihiro "Matz" Matsumoto
`byteslice` creates 2 string objects. `_bufread` creates one, and modifies the original buffer string, that is more efficient.
2019-08-24Create a symbolic link in the temporary directory; fix #4642dearblue
Because the linker gives a warning on FreeBSD 12.0. ``` warning: mktemp() possibly used unsafely; consider using mkstemp() ```
2019-08-18Make symbolic link names unique for testdearblue
2019-08-05Use new specifiers/modifiers of `mrb_vfromat()`KOBAYASHI Shuji
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back.
2019-07-30Refine message to `skip` in nested `assert`KOBAYASHI Shuji
- I think "Info" is used only to `skip`, so change to "Skip". - Changed the default value of `assert` and specify the argument explicitly at the caller of `assert` because it is unnatural "Assertion failed" is output even though the assertion doesn't fail. == Example: def assert_foo(exp, act) assert do assert_equal exp[0], act[0] assert_equal exp[1], act[1] end end def assert_bar(exp, act) assert do skip end end def assert_baz(exp, act) assert do assert_equal exp, act assert_bar exp, act end end assert 'test#skip_in_nested_assert' do assert_baz 1, 1 end === Before this patch: ?.. Info: test#skip_in_nested_assert (core) - Assertion[1] Info: Assertion failed (core) - Assertion[1-2] Skip: Assertion failed (core) Total: 3 OK: 2 KO: 0 Crash: 0 Warning: 0 Skip: 1 === After this patch: ??? Skip: test#skip_in_nested_assert (core) - Assertion[1] Skip: assert (core) - Assertion[1-2] Skip: assert (core) Total: 3 OK: 0 KO: 0 Crash: 0 Warning: 0 Skip: 3
2019-06-29Use nested `assert`dearblue
2019-06-29Use a normal method instead of a lambdadearblue
Ref commit 35319bed01d58c785f73ce03e67d4e58be30f4b5
2019-05-10Raise `TypeError` if the argument type is unsupported in `mrb_stat0`KOBAYASHI Shuji
2019-05-07Refactor `mrb_str_to_cstr` and `mrb_string_value_cstr`KOBAYASHI Shuji
- Extract null byte check to function. - Avoid string allocation if null byte is included. - Use `str_new` instead of `mrb_str_dup` + `mrb_str_modify`
2019-05-06Avoid using `mrb_str_to_cstr` if possibleKOBAYASHI Shuji
Because it always allocate new string. Replace with the followings: - Use `RSRING_PTR` if string is guaranteed to be null-terminated. - Use `mrb_string_value_cstr` or `mrb_get_args("z")` if return value isn't modified.
2019-04-29Fix missing assertions in `mruby-io` testKOBAYASHI Shuji
2019-04-27Remove duplicated `String#each_char`KOBAYASHI Shuji
2019-04-15Fix test, popen and cmd in mruby-ioShouji Kuboyama
2019-02-26Remove unneeded `const_defined?(:Time)` in `mruby-io` testKOBAYASHI Shuji
`mruby-time` is included in test dependencies.
2019-01-28Use assertion methods in `FileTest` testsKOBAYASHI Shuji
2019-01-27Remove no meaning statements in `mruby-io` testsKOBAYASHI Shuji
2019-01-25Merge pull request #4245 from shuujii/remove-assert_nothing_raised-in-io-testYukihiro "Matz" Matsumoto
Remove definition of `assert_nothing_raised` in `IO` test
2019-01-25Merge pull request #4246 from shuujii/use-assertion-methods-in-file-testYukihiro "Matz" Matsumoto
Use assertion methods in `File` test
2019-01-25Remove unused file for `mruby-io` testKOBAYASHI Shuji
2019-01-25Use assertion methods in `File` testKOBAYASHI Shuji
2019-01-25Remove definition of `assert_nothing_raised` in `IO` testKOBAYASHI Shuji
2019-01-09Use `$mrbtest_io_wfname` for `chmod` test.Yukihiro "Matz" Matsumoto
2019-01-01io: Skip TTY test for environments that TTY device is unavailable.KOBAYASHI Shuji
e.g. GitLab CI
2018-08-30Separate meta-programming features to `mruby-metaprog` gem.Yukihiro "Matz" Matsumoto
We assume meta-programming is less used in embedded environments. We have moved following methods: * Kernel module global_variables, local_variables, singleton_class, instance_variables, instance_variables_defined?, instance_variable_get, instance_variable_set, methods, private_methods, public_methods, protected_methods, singleton_methods, define_singleton_methods * Module class class_variables, class_variables_defined?, class_variable_get, class_variable_set, remove_class_variable, included_modules, instance_methods, remove_method, method_removed, constants * Module class methods constants, nesting Note: Following meta-programming methods are kept in the core: * Module class alias_method, undef_method, ancestors, const_defined?, const_get, const_set, remove_const, method_defined?, define_method * Toplevel object define_method `mruby-metaprog` gem is linked by default (specified in default.gembox). When it is removed, it will save 40KB (stripped:8KB) on x86-64 environment last time I measured.
2018-08-13Try to fix a fragile `File#mtime` test.Yukihiro "Matz" Matsumoto
2018-06-20Use temporary name for `File#mtime` test to avoid conflicts.take-cheeze
2018-01-30add File#mtimeYasuhiro Matsumoto
2018-01-14IO#close_on_exec? is not supported on MinGWksss
2018-01-14Should be true for close_on_exec flagksss
2017-12-17Implement IO#initialize_copyksss
2017-12-14On Windows, `_S_IREAD` and `_S_IWRITE` is defined in `sys/stat.h`.Yukihiro "Matz" Matsumoto
2017-12-14Use `_open` and `_close` on Windows.Yukihiro "Matz" Matsumoto
2017-12-14fix mkstemp implementation for MSVCYasuhiro Matsumoto
2017-12-13fix crash bug on WindowsYasuhiro Matsumoto
2017-12-13close file descriptorsYasuhiro Matsumoto
2017-12-13mingw have mkstempYasuhiro Matsumoto
2017-12-13fix testYasuhiro Matsumoto
2017-12-12Fixed mruby-io test failure on Windows platform.Hiroshi Mimaki
2017-12-09`File.symlink` may not be implemented on some platforms; ref #3877Yukihiro "Matz" Matsumoto
2017-12-09Skip "File.readlink fails" test on MSVCbamchoh
When MSVC, "File.readlink fails with non-symlink" test was failed even if raising NotImplementedError
2017-12-08Fixed compile error of `mruby-io` gem on MinGW.Hiroshi Mimaki
2017-12-08Avoid VC++ reserved word `template`.Yukihiro "Matz" Matsumoto
2017-12-08AppVeyor compile errors resolution.Yukihiro "Matz" Matsumoto
2017-12-08AppVeyor compiler does not proved some POSIX functions.Yukihiro "Matz" Matsumoto
- `mode_t` by `int` - `umask` by `_umask` - `rmdir` by `_rmdir` - `mkstemp` and `mkdtemp` by using `_mktemp`
2017-12-07Add 'mrbgems/mruby-io/' from commit '3c8e1f94c44252c836f79a48bb17726da28e2756'Yukihiro "Matz" Matsumoto
git-subtree-dir: mrbgems/mruby-io git-subtree-mainline: 10ed730e4bd921cf4d8fe6f6d2e3cb3f0840f3b7 git-subtree-split: 3c8e1f94c44252c836f79a48bb17726da28e2756