Commit Graph
5018 Commits
Author SHA1 Message Date
Luca Ottaviano bbe54bc0a8 tests/chmod: add missing test for many symbolic permissions at once 2016-04-02 10:29:57 +02:00
Luca Ottaviano 2686ea75d7 chmod: handle -octal and -[rwx]
The main issue is that -octal or -[rwx] is interpreted as an option by
getopts.
Search the args for such a pattern, remove it before parsing and
manually handle it afterwards.
Fixes #788.
2016-04-02 10:29:57 +02:00
Luca Ottaviano 9005ae7dbf tests/chmod: refactor tests to only create reference file once 2016-04-02 10:29:35 +02:00
Joseph Crail fb0e6a9dee tests/sort: simplify input to helper 2016-03-29 00:58:24 -04:00
Joseph Crail 6b129887d6 tests/sort: add test for default mode 2016-03-29 00:58:24 -04:00
Joseph Crail b290c10845 tests/sort: refactor to match other tests
Instead of using numerals to denote individual cases, I used descriptive
case names. I also changed the extension for the expected output fixture
to match other tests.

I removed one redundant test and another unnecessary helper function.
2016-03-29 00:58:24 -04:00
Joseph Crail 91df9b14da tests: remove unused method 2016-03-28 23:25:50 -04:00
Joseph Crail 7d103a0a64 tests: fix whitespace 2016-03-28 23:25:26 -04:00
Joseph Crail 1fecba3226 tests/{readlink, realpath}: fix tests on Windows
I fixed the tests that assumed paths used a Unix directory separator.
2016-03-28 23:24:40 -04:00
Heather c954b01aa3 Merge pull request #854 from fitzgen/tests-for-tail-bytes
Miscellaneous `tail` related commits
2016-03-28 09:05:48 +04:00
Nick Fitzgerald 0d281cf886 tests/tail: Test when -n is larger than the number of lines in the file 2016-03-27 14:42:45 -07:00
Nick Fitzgerald 9a5209a7a4 tests/tail: Rename INPUT to FOOBAR_TXT as there are more than one inputs 2016-03-27 14:41:56 -07:00
Nick Fitzgerald 0bc05e2dcf tests/tail: Add a test for tail'ing large files in bytes mode 2016-03-27 14:34:59 -07:00
Nick Fitzgerald 1be7d31d5a tests/tail: Refactor the test_single_big_args test to use ScopedFile 2016-03-27 14:34:59 -07:00
Nick Fitzgerald a629bb3076 tests: Create the ScopedFile type for temporary files in tests
This commit adds the `ScopedFile` type, which wraps and derefs to a `File`. When
a `ScopedFile` is dropped, it removes the underlying file from the
filesystem. This is useful for temporary, generated files in tests.
2016-03-27 14:34:59 -07:00
Joseph Crail ec14be84aa tests/pwd: fix broken Windows test
Due to canonicalize()'s use of GetFinalPathNameByHandleW() on Windows,
the resolved path starts with '\\?\' to extend the limit of a given path
to 32,767 wide characters.

To address this issue, we remove this prepended string if available.
2016-03-27 03:28:55 -04:00
Nick Fitzgerald 9824bc4db3 Add a test for tail -c <BYTES> from stdin 2016-03-26 11:56:00 -07:00
Nick Fitzgerald 445233389e Add a test for tail -c <BYTES> <FILE> 2016-03-26 11:52:10 -07:00
Jeremiah Peschka 0bb0c40c36 Adding tests for ls. Corrected issue with ls on the present directory throwing panic!() 2016-03-25 14:25:52 -07:00
Joseph Crail faedb2dd2e tests/sort: fix flag for human numeric test 2016-03-25 16:55:58 -04:00
Joseph Crail 55c0b1786f tests/sort: add tests for month sort 2016-03-25 16:55:58 -04:00
Nick Fitzgerald d7974c56a0 tests/tail: Add a test for tail'ing large files
This tests both large files and iterating backwards through the file when we
need to search backwards further than our BUFFER_SIZE.
2016-03-21 07:51:48 -07:00
Nick Fitzgerald 161f96dc8c tests/tail: Rename tail test fixture contents to be easier to read
The repetition of "foo" and "bar" made for difficult-to-read assertion failures
when hacking on `tail`. I think that having each line have unique contents makes
it a bit easier to parse.
2016-03-21 07:51:42 -07:00
Luca Ottaviano 5dc0a55630 chmod: fix reference option
Reference option must have a file path.
Fix C interface using CString.
Better error message if the file doesn't exist.
2016-03-10 20:34:49 +01:00
Chirag B. Jadwani 676e3718c3 uniq: add tests 2016-02-29 11:07:16 +05:30