Commit graph

20 commits

Author SHA1 Message Date
Alex Jiang
58b4075566 hostname: bug fix for non-windows xgethostname and add test case
Cstr::from_bytes_with_nul needs input bytes null terminated. Current
version does not include the last null byte, hence
Cstr::from_bytes_with_nul will panic with error 'FromBytesWithNulError {
kind: NotNulTerminated }'
2018-04-22 21:04:51 +08:00
bootandy
e253406026 du: Fix incorrect block size assumption.
du and other tools like stat assume a 512 byte block. ls is the only
tool to use 1024.

Add Simple set of tests
2018-03-20 16:59:29 -04:00
Alex Lyon
880a4973c1 Format everything using rustfmt 2018-03-12 01:20:58 -07:00
Alex Lyon
d8e738c49b tests: disable some chgrp tests when part of the root group
Some tests failed when run using Docker because they assumed the
user would never be root.  This is more of a band-aid solution.
An actual fix would be to test see if something like these tests
were to succeed when the user is root.
2018-03-03 12:04:22 -08:00
Konstantin Pospelov
b33ce67d91 join: implement basic functionality
The basic implementation of join with some tests. The supported
options: -1, -2, -j, -a, -i.
2017-12-14 00:02:42 +03:00
Yury Krivopalov
b2ad51839b Add numfmt 2017-11-09 00:23:24 +03:00
Alexander Batischev
655804cff4 tests/chmod: protect umask with a mutex
`test_chmod_ugoa` and `test_chmod_many_options` both change umask, which
is global state. Since tests run concurrently, this might lead to
a situation where one of the tests changes umask to a value that screws
another test's checks. To prevent this, we introduce a mutex that should
be held by any test that changes umask.

Unfortunately, there's no way to hide umask behind this mutex and
enforce its usage: programmers will have to maintain the discipline
themselves.
2016-12-19 13:14:38 +03:00
Knight
d2d9fcd628 chgrp: add tests 2016-08-21 17:40:46 +08:00
Knight
7637115e51 who: add tests 2016-08-11 15:37:39 +08:00
Knight
cfc28ebc05 tests: extern crates in separated test modules 2016-08-07 01:12:19 +08:00
Knight
b0097d0565 base32: add tests 2016-08-07 00:41:53 +08:00
mpkh
da0de488e6 Merge pull request #913 from knight42/pinky
Implement pinky
2016-07-26 13:38:53 +04:00
Knight
be20d8605d pinky: add tests 2016-07-26 17:26:22 +08:00
Ben Eills
e72ec4a5bb Implement skeleton install utility
Add install utility skeleton source, based on
mv, including the getopts setup mirroring
GNU's `man install` documentation.  Also
add a single test and build system code.
2016-07-12 20:56:21 +02:00
Knight
19676a3ca2 chown: Add tests 2016-06-22 21:39:46 +08:00
Knight
1695441880 Conditionally compile test modules 2016-06-12 15:04:10 +08:00
Knight
ab17a5e544 stat: Add entries 2016-06-04 13:33:08 +08:00
Joseph Crail
53c62db8d6 pathchk: make Unix only 2016-05-22 16:41:36 -04:00
Joseph Crail
de7b6202a8 tests: move pathchk into new format 2016-05-22 15:10:16 -04:00
Joseph Crail
7ef4bb37a8 tests: consolidate into one crate
The main motivation is to move toward running those tests for a specific
target, that is, if a test won't run on Windows, then we shouldn't build
it. This was previously the default behavior and prevented a successful
run on AppVeyor.

I borrowed this pattern from the tests in the Cargo project.
2016-05-22 03:46:54 -04:00