Commit Graph

252 Commits

Author SHA1 Message Date
01f041b9f3 fix simple spelling error 2017-03-23 12:37:46 +01:00
9a899213f0 find test_* methods in base classes too
this makes it prossible to structure tests better
and even used "mixin" of modules with test_* methods
2017-03-23 10:26:27 +01:00
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
fe5dbe704e Allow specifying tests with 'cmdtest_in_dir'
The entry point 'cmdtest_in_dir' now accepts and passes on arguments
that optionally specifies which tests to be run. This can be done on file
level, class level and method level.

As the list of optional named arguments is quite long, they are now
keyword arguments.
2016-12-13 09:45:53 -08:00
9b977a8761 quote ' and " in XML output too 2016-12-07 21:54:45 +01:00
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
017db356db test helper script to print ctrl characters 2016-12-07 21:41:20 +01:00
43cb4be270 remove LogBaseMixin, use method_missing?
this gets rid of some unnecessary boilerplate code
2016-11-30 23:04:32 +01:00
7f7baa4dad include hour/minute in Debian package version 2016-11-30 15:22:53 +01:00
f813ccf196 add CHANGES.txt file 2016-11-29 21:59:16 +01:00
e7001794fa avoid JRuby bug when reading directory as file
one would expect an EISDIR error, but instead JRuby
seems to get stuck using 100% CPU and getting nowhere.
Cmdtest just needs to be able to issue an error message.
2016-11-28 22:30:42 +01:00
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
592005f808 add executed commands to JUnit error output 2016-11-28 14:59:34 +01:00
4164dd7752 rename cmdline() argument 2016-11-28 13:37:13 +01:00
5c84e04a51 add 'time=n.nnn' attribute in JUnit output 2016-11-28 13:21:21 +01:00
93519ab612 make stdout_contain work again
after introduction of FileContent class
to handle file encoding in a stricter way
2016-11-18 15:10:13 +01:00
d6e6189cb3 minimal test of stdout_contain/stderr_contain 2016-11-18 15:08:03 +01:00
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
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
6c14d32cce add test of 'output_encoding' 2016-11-16 22:36:25 +01:00
9505af3dcc improve line ending detection + add tests
should hopefully work on Linux and Windows now
2016-11-16 22:34:00 +01:00
c3ee66e5c5 detect mixed line ending on Windows 2016-11-16 17:47:03 +01:00
2b1126a508 introduce 'output_encoding' method
to tell cmdtest what encoding to expect from STDOUT/STDERR
and from files inspected with 'file_equal'.
2016-11-16 17:27:55 +01:00
cfc08acd15 avoid 'recursive_find' over directory symlink
this could cause an endless recursion if a symlink pointed
upwards in the file tree
2016-11-09 16:42:55 +01:00
4bfa4a625d update documentation 2016-11-08 09:59:22 +01:00
fd4b3e09af add ZIP to CPACK_GENERATOR 2016-11-08 09:09:32 +01:00
6672d7bccf new 'file_encoding' assert method + test 2016-11-07 23:56:01 +01:00
b63c6ee187 add test of 'skipped' in summary 2016-11-07 19:04:18 +01:00
af412833bc minimal test of 'skip_test' 2016-11-07 18:32:39 +01:00
94130debdd avoid running command at 'skip_test'
this happened by accident (a copy/paste bug).
Now the Ruby exception is thrown immediately.
2016-11-07 18:30:29 +01:00
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
bb2e7bf4a7 'echo PWD=$(pwd)' -> 'echo_pwd.rb' for Windows
missed in earlier commit 6a7bdbd
2016-11-07 10:58:34 +01:00
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
9156ee3a34 skip readonly test on Windows (chmod, ...) 2016-11-07 09:22:40 +01:00
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
1ed22c3163 add test of --no-diff option 2016-11-04 22:49:36 +01:00
3c83c52c70 --diff by default, new --no-diff option 2016-11-04 22:26:05 +01:00
cd699f4a8e 1.4 -> 1.5, with 'skip_test' ... 2016-11-04 17:22:00 +01:00
12f905a31b add 'skip_test' 2016-10-31 00:33:20 +01:00
02c45f4ac9 add basic test of 'dont_ignore_files' 2016-10-30 22:35:32 +01:00
16a882521c whitespace cleanup 2016-10-30 22:09:36 +01:00
9331f23065 make test work with recent FsSnapshot changes 2016-10-30 21:55:03 +01:00
1af393872c 'teardown' should run after AssertFailed too 2016-10-30 21:42:47 +01:00
dfb27787fe add 'dont_ignore_files' 2016-10-30 18:45:18 +01:00
6e16688a1b all files in FsSnapshot, but with ignored flag 2016-10-30 18:05:33 +01:00
8a2af873ef call '_delayed_run_cmd' already in 'comment' 2016-10-26 23:18:34 +02:00
d9b1b2accf Merged in hth313/cmdtest (pull request )
Allow timeout on test cases
2016-10-13 19:58:59 +00:00
991db268b2 Use keyword-only argument 2016-10-13 12:52:22 -07:00
d1c5da0b21 Merge holmberg556/cmdtest into master 2016-10-13 11:35:37 -07:00
d8121b1d5e Allow timeout on test cases
Certain commands are likely to fail to terminate in case something goes
wrong. Having the ability to force such commands to terminate after a
certain time is useful.
2016-10-13 11:20:32 -07:00