60 Commits

Author SHA1 Message Date
Johan Holmberg
04c31df479 sort "CMDTEST_*.rb" files alphabetically
by sorting the result of Dir.glob().
This should make "CMDTEST_*.rb" being run in a well defined order.
2017-02-28 10:24:27 +01:00
Johan Holmberg
b80d52c480 use ^@, ^A,... escapes in XML output + test
to avoid writing non-printable characters
to the XML file.
2016-12-07 21:44:46 +01:00
Johan Holmberg
017db356db test helper script to print ctrl characters 2016-12-07 21:41:20 +01:00
Johan Holmberg
58ca0a1e8b enable testing running cmdtest with jruby
or some other "non-standard" Ruby.
The environment variable CMDTEST_RUBY is used to select
which Ruby to use.
2016-11-28 20:06:21 +01:00
Johan Holmberg
d6e6189cb3 minimal test of stdout_contain/stderr_contain 2016-11-18 15:08:03 +01:00
Johan Holmberg
b18b462328 add --stdout/stderr option to lines.rb
to make it easier to generate test output
on both stdout and stderr
2016-11-18 15:05:49 +01:00
Johan Holmberg
67a662f1c6 use env.rb and grep.rb in test
to avoid depending on some env.exe and grep.exe
on Windows.
2016-11-17 10:30:29 +01:00
Johan Holmberg
6c14d32cce add test of 'output_encoding' 2016-11-16 22:36:25 +01:00
Johan Holmberg
9505af3dcc improve line ending detection + add tests
should hopefully work on Linux and Windows now
2016-11-16 22:34:00 +01:00
Johan Holmberg
6672d7bccf new 'file_encoding' assert method + test 2016-11-07 23:56:01 +01:00
Johan Holmberg
b63c6ee187 add test of 'skipped' in summary 2016-11-07 19:04:18 +01:00
Johan Holmberg
af412833bc minimal test of 'skip_test' 2016-11-07 18:32:39 +01:00
Johan Holmberg
42342d0c96 handle Unicode filenames on Windows + test
by adding an argument "encoding: 'UTF-8'" to Dir.entries.
Also add minimal test.
2016-11-07 14:53:21 +01:00
Johan Holmberg
bb2e7bf4a7 'echo PWD=$(pwd)' -> 'echo_pwd.rb' for Windows
missed in earlier commit 6a7bdbd
2016-11-07 10:58:34 +01:00
Johan Holmberg
06b011204a accept Windows drive letter paths in tests
on Windows Dir.pwd returns a path like "c:/some/dir",
and the tests mainly cares about the suffix of the path
so accepting an optional drive letter at the beginning
should be ok.
2016-11-07 09:25:27 +01:00
Johan Holmberg
9156ee3a34 skip readonly test on Windows (chmod, ...) 2016-11-07 09:22:40 +01:00
Johan Holmberg
6a7bdbdfe4 make tests more Windows-friendly
by using Ruby helper scripts instead fo relying
on the existence of Unix commands
2016-11-05 00:49:22 +01:00
Johan Holmberg
1ed22c3163 add test of --no-diff option 2016-11-04 22:49:36 +01:00
Johan Holmberg
3c83c52c70 --diff by default, new --no-diff option 2016-11-04 22:26:05 +01:00
Johan Holmberg
12f905a31b add 'skip_test' 2016-10-31 00:33:20 +01:00
Johan Holmberg
02c45f4ac9 add basic test of 'dont_ignore_files' 2016-10-30 22:35:32 +01:00
Johan Holmberg
9331f23065 make test work with recent FsSnapshot changes 2016-10-30 21:55:03 +01:00
Johan Holmberg
5fdd86537d working setenv/unsetenv + tests
need to be implemented for Windows too
2016-10-10 15:11:21 +02:00
Johan Holmberg
e76dd95bcb add test of -h and --help 2016-09-26 23:51:15 +02:00
Johan Holmberg
5f2d906ddf add test of ### vs. --- is summary line 2016-09-17 21:10:14 +02:00
Johan Holmberg
502e242402 minimal test of --diff option 2016-06-28 09:06:34 +02:00
Johan Holmberg
19d55530f5 add 'cmd_cmdtest_diff' passing --diff option 2016-06-28 09:04:08 +02:00
Johan Holmberg
8943e46c44 --lines option to echo_stdout.rb/echo_stdout.rb
for new tests wanting several lines
2016-06-28 09:02:33 +02:00
Johan Holmberg
deb6af6086 handle exception in setup/teardown
+ new test of this and exception in test_* methods
2016-06-26 21:12:53 +02:00
Johan Holmberg
4cbbac7ec1 test current directory in "teardown" method
even when current directory is changed within a test method
the "teardown" method should have same current directory
as "setup" and as the the original value in the test method.
2016-06-04 20:53:49 +02:00
Johan Holmberg
dc4ab527de test that readonly directory give error
ie. when cmdtest fails to remove the "work"
directory between test methods. Previously
cmdtest relied on FileUtils.rm_rf, but it could
fail silently, leading to weird consequences.
2016-06-04 20:49:59 +02:00
Johan Holmberg
bbf4b92b1d introduce 'import_directory' 2016-04-14 19:56:38 +02:00
Johan Holmberg
393a92ae33 require file argument to 'import_file' + test 2016-04-14 19:54:50 +02:00
Johan Holmberg
2bb93b9536 add test with no errors; test exit code too 2015-08-17 23:37:50 +02:00
Johan Holmberg
5021972318 first version using parallel(1)
to implement -jN option to cmdtest.
may need some cleanup/refactoring.
2015-08-17 23:03:42 +02:00
Johan Holmberg
b9c716a80e basic tests of 'cmdtest' command line options 2015-08-04 23:32:20 +02:00
Johan Holmberg
651b613ba0 remove parallel-, revive incremental-support 2015-08-04 10:29:25 +02:00
Johan Holmberg
1765eda504 add 'cmd_cmdtest_verbose' in 'SelftestUtils' 2015-07-29 13:38:12 +02:00
Johan Holmberg
df78fc17d6 test of summary line 2015-07-29 13:38:12 +02:00
Johan Holmberg
d5f29a821c ignore_file accepts shell glob (*, **)
+ test of this new behaviour
2015-07-29 13:32:04 +02:00
Johan Holmberg
bce88a3741 test "Dir.chdir" / "create_file" interaction 2015-06-15 21:32:27 +02:00
Johan Holmberg
43078cab8e test 'chdir' and 'Dir.chdir' in test methods
should work both in normal mode and with -jN
2015-06-15 21:06:48 +02:00
Johan Holmberg
1c9efc3cad test get_path/set_path 2015-05-26 21:04:34 +02:00
Johan Holmberg
73249f5fd5 test use of 'chdir' 2015-05-26 20:44:49 +02:00
Johan Holmberg
ed7f81a5fa tests: change regexp display (?-mix:^22$) --> /^22$/ 2014-09-07 22:57:54 +02:00
Johan Holmberg
1e6e3ca0a2 handle current directory containing spaces 2013-11-22 01:36:50 +01:00
Johan Holmberg
77ca78c161 test current directory can contain spaces 2013-11-22 01:32:38 +01:00
Johan Holmberg
dec7206f12 adapt tests to removed 'chdir' 2012-06-17 14:19:10 +02:00
Johan Holmberg
daa7f12fbd Improve detection of Windows. 2011-11-04 23:38:52 +01:00
Johan Holmberg
21411e4a87 Renamed "echo-stdout.rb" and "echo-stderr.rb"
to get automatic addition of "ruby -S" on Windows.
2011-11-04 23:12:48 +01:00