modified tests to work on both Windows and Linux.

This commit is contained in:
Johan Holmberg 2009-05-12 16:04:57 +00:00 committed by holmberg556
parent 9e417d8700
commit c81b4c0c45

@ -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