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
592005f808
add executed commands to JUnit error output
2016-11-28 14:59:34 +01:00
Johan Holmberg
4164dd7752
rename cmdline() argument
2016-11-28 13:37:13 +01:00
Johan Holmberg
5c84e04a51
add 'time=n.nnn' attribute in JUnit output
2016-11-28 13:21:21 +01:00
Johan Holmberg
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
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
c3ee66e5c5
detect mixed line ending on Windows
2016-11-16 17:47:03 +01:00
Johan Holmberg
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
Johan Holmberg
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
Johan Holmberg
4bfa4a625d
update documentation
2016-11-08 09:59:22 +01:00
Johan Holmberg
fd4b3e09af
add ZIP to CPACK_GENERATOR
2016-11-08 09:09:32 +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
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
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
cd699f4a8e
1.4 -> 1.5, with 'skip_test' ...
2016-11-04 17:22:00 +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
16a882521c
whitespace cleanup
2016-10-30 22:09:36 +01:00
Johan Holmberg
9331f23065
make test work with recent FsSnapshot changes
2016-10-30 21:55:03 +01:00
Johan Holmberg
1af393872c
'teardown' should run after AssertFailed too
2016-10-30 21:42:47 +01:00
Johan Holmberg
dfb27787fe
add 'dont_ignore_files'
2016-10-30 18:45:18 +01:00
Johan Holmberg
6e16688a1b
all files in FsSnapshot, but with ignored flag
2016-10-30 18:05:33 +01:00
Johan Holmberg
8a2af873ef
call '_delayed_run_cmd' already in 'comment'
2016-10-26 23:18:34 +02:00
Johan Holmberg
d9b1b2accf
Merged in hth313/cmdtest (pull request #2 )
...
Allow timeout on test cases
2016-10-13 19:58:59 +00:00
Håkan Thörngren
991db268b2
Use keyword-only argument
2016-10-13 12:52:22 -07:00
Håkan Thörngren
d1c5da0b21
Merge holmberg556/cmdtest into master
2016-10-13 11:35:37 -07:00
Håkan Thörngren
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
Johan Holmberg
6b0bee4de5
setenv/unsetenv for Windows too
2016-10-10 15:26:35 +02: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
136bb53a89
improve --version output
...
now showing a value like 1.4.20161008,
the same as the DEB package
2016-10-08 21:04:30 +02:00
Johan Holmberg
70e6aaa9a7
avoid creating DEB package on MacOS
2016-10-08 18:32:57 +02:00
Johan Holmberg
3f80a9a1ea
creation on DEB packages
...
with improved version numbering
2016-10-07 16:45:10 +02:00
Johan Holmberg
e9974f5922
add 'generate-debian-package' rake task
2016-10-07 16:39:19 +02:00
Johan Holmberg
aa9d2c4f93
handle --help as any other option
...
earlier -h was recognized as a special case
in "argumentparser.rb"
2016-09-27 00:03:52 +02:00
Johan Holmberg
e76dd95bcb
add test of -h and --help
2016-09-26 23:51:15 +02:00
Johan Holmberg
e6a9092783
add --stop-on-error option
...
to stop after first error. If running in parallel,
we don't know how to stop immediately, so that
option combination is disallowed.
2016-09-17 23:17:23 +02:00
Johan Holmberg
419ace2d58
avoid --help twice in help message
2016-09-17 22:50:40 +02:00
Johan Holmberg
c6cfae144c
report finished time
2016-09-17 22:42:17 +02:00