Files
bin
doc
examples
lib
python
src
t
bin
00-assert.rb
00-exit_nonzero.rb
00-exit_status.rb
00-exit_zero.rb
00-file_equal.rb
00-file_not_equal.rb
00-ignore_file.rb
00-import_file.rb
00-stderr_equal.rb
00-stderr_not_equal.rb
00-stdout_equal.rb
00-stdout_not_equal.rb
01-cmd.rb
01-misc.rb
01-simple.rb
CMDTEST_assert.rb
CMDTEST_chdir.rb
CMDTEST_cmd.rb
CMDTEST_exit_nonzero.rb
CMDTEST_exit_status.rb
CMDTEST_exit_zero.rb
CMDTEST_file_equal.rb
CMDTEST_file_not_equal.rb
CMDTEST_ignore_file.rb
CMDTEST_import_file.rb
CMDTEST_misc.rb
CMDTEST_simple.rb
CMDTEST_stdxxx_equal.rb
selftest_utils.rb
.hgignore
COPYING.txt
README.html
README.rst
Rakefile
file1.txt
file2.txt
run-regression.rb
setup.rb
cmdtest/t/00-stdout_equal.rb
Johan Holmberg 2c61efb00d add tests
2009-03-24 08:43:47 +00:00

105 lines
1.9 KiB
Ruby

#======================================================================
# test stdout_equal
#-----------------------------------
# stdout_equal -- correct ""
cmd "true.rb" do
stdout_equal ""
end
# stdout begin
# ### true.rb
# stdout end
#-----------------------------------
# stdout_equal -- incorrect ""
cmd "echo.rb hello world" do
stdout_equal ""
end
# stdout begin
# ### echo.rb hello world
# --- ERROR: wrong stdout
# --- actual: hello world
# --- expect: [[empty]]
# stdout end
#-----------------------------------
# stdout_equal -- correct []
cmd "true.rb" do
stdout_equal []
end
# stdout begin
# ### true.rb
# stdout end
#-----------------------------------
# stdout_equal -- incorrect []
cmd "echo.rb hello world" do
stdout_equal []
end
# stdout begin
# ### echo.rb hello world
# --- ERROR: wrong stdout
# --- actual: hello world
# --- expect: [[empty]]
# stdout end
#-----------------------------------
# stdout_equal -- correct [ "hello world" ]
cmd "echo.rb hello world" do
stdout_equal [ "hello world" ]
end
# stdout begin
# ### echo.rb hello world
# stdout end
#-----------------------------------
# stdout_equal -- incorrect [ "hello world" ]
cmd "true.rb" do
stdout_equal [ "hello world" ]
end
# stdout begin
# ### true.rb
# --- ERROR: wrong stdout
# --- actual: [[empty]]
# --- expect: hello world
# stdout end
#-----------------------------------
# stdout_equal -- correct [ "hello", "world" ]
cmd "echo.rb hello && echo.rb world" do
stdout_equal [ "hello", "world" ]
end
# stdout begin
# ### echo.rb hello && echo.rb world
# stdout end
#-----------------------------------
# stdout_equal -- incorrect [ "hello", "world" ]
cmd "true.rb" do
stdout_equal [ "hello", "world" ]
end
# stdout begin
# ### true.rb
# --- ERROR: wrong stdout
# --- actual: [[empty]]
# --- expect: hello
# --- world
# stdout end