diff --git a/t/01-simple.rb b/t/01-simple.rb index 4749776..3d91c52 100644 --- a/t/01-simple.rb +++ b/t/01-simple.rb @@ -1,6 +1,8 @@ #----------------------------------- # try to run non-existing command +# +# REQUIRE: RUBY_PLATFORM !~ /mswin32/ cmd "non-existing" do exit_nonzero @@ -11,8 +13,27 @@ end # ### non-existing # stdout end +#----------------------------------- +# try to run non-existing command +# +# REQUIRE: RUBY_PLATFORM =~ /mswin32/ + +cmd "non-existing" do + exit_nonzero + stderr_equal [ + /non-existing.*not recognized/, + /program or batch file/, + ] +end + +# stdout begin +# ### non-existing +# stdout end + #----------------------------------- # FAILING try to run non-existing command +# +# REQUIRE: RUBY_PLATFORM !~ /mswin32/ cmd "non-existing" do end @@ -25,6 +46,23 @@ end # --- expect: [[empty]] # stdout end +#----------------------------------- +# FAILING try to run non-existing command +# +# REQUIRE: RUBY_PLATFORM =~ /mswin32/ + +cmd "non-existing" do +end + +# stdout begin +# ### non-existing +# --- ERROR: expected zero exit status, got 1 +# --- ERROR: wrong stderr +#/--- actual:.*non-existing.*not recognized +#/--- .*program or batch file +# --- expect: [[empty]] +# stdout end + #----------------------------------- # "true.rb" is archetypic command: zero exit status, no output