Luca Ottaviano
bbe54bc0a8
tests/chmod: add missing test for many symbolic permissions at once
2016-04-02 10:29:57 +02:00
Luca Ottaviano
6ded76714b
chmod: remove unused dependencies
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
Heather
9e5a2400be
Merge pull request #856 from jbcrail/refactor-sort-tests
...
Refactor sort tests
2016-03-29 09:31:51 +04: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
Heather
977d352c05
Merge pull request #855 from jbcrail/fix-readlink-realpath-tests
...
Fix readlink/realpath tests on Windows
2016-03-29 08:40:04 +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
Heather
b17adf1320
Merge pull request #853 from jbcrail/fix-pwd-test
...
tests/pwd: fix broken Windows test
2016-03-28 08:59:46 +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
Nick Fitzgerald
2b2c2b64c2
tail: When tailing a file in bytes mode, seek directly to the specified byte
...
When tailing a file, as opposed to stdin, and we are tailing bytes rather than
lines, we can seek the requested number of bytes from the end of the file. This
side steps the whole `backwards_thru_file` file loop and blocks of reads.
Fixes #833 .
2016-03-27 14:34:58 -07:00
Nick Fitzgerald
f851611001
tail: Pre-fill the buffer with zeroes
...
Rather than fill the buffer on every file read iteration, pre-fill it with
zeroes once at initialization time.
2016-03-27 14:34:58 -07:00
Heather
183224db15
Merge pull request #852 from jbcrail/contributing-commit-msgs
...
CONTRIBUTING: add guidelines for commit msgs
2016-03-27 19:50:56 +04: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
Joseph Crail
e0c21b99c5
Merge pull request #851 from fitzgen/tests-for-tail-bytes
...
Tests for `tail -c <bytes>`
2016-03-26 18:38:41 -04:00
Joseph Crail
7990fa11bf
CONTRIBUTING: add guidelines for commit msgs
2016-03-26 18:31:01 -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
Michael Gehring
1922267076
Merge pull request #844 from jbcrail/sort_add_month
...
sort: refactor and add month sort
2016-03-26 07:26:13 +01:00
Joseph Crail
491320747b
sort: remove explicit enum values
2016-03-25 16:55:58 -04: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
Joseph Crail
2cdccb10bb
sort: fix whitespace and spelling
2016-03-25 16:55:58 -04:00
Joseph Crail
cc63565051
sort: add month sort
2016-03-25 16:55:58 -04:00
Joseph Crail
678a3d1451
sort: fix flag for human numeric sort
2016-03-25 16:55:50 -04:00
Joseph Crail
6488f168fb
sort: refactor settings into dedicated struct
2016-03-25 16:51:39 -04:00
Heather
9c477a9ca8
Merge pull request #843 from llogiq/clippy
...
fix two clippy warnings
2016-03-24 15:38:45 +04:00
Andre Bogus
986c00cd91
fix two clippy warnings
2016-03-24 12:15:01 +01:00
Heather
e382ee637b
Merge pull request #840 from ebfe/travis
...
travis: build/test everything on stable
2016-03-23 17:20:54 +04:00
Michael Gehring
1183dcd7a1
travis: build/test everything on stable
2016-03-23 13:15:36 +01:00
Heather
2d07ec7a58
Merge pull request #839 from Shiroy/uucore_lib_name
...
Add missing lib.name for uucore
2016-03-23 15:25:58 +04:00
Shiroy
c8ff895018
Add missing lib.name for uucore
...
Fix build on Linux
2016-03-23 08:44:09 +01:00
Alex Lyon
94b8f9fe37
Merge pull request #836 from jamwt/fix_sleep
...
Fix sleep duration calculations.
2016-03-22 18:00:18 -07:00
Joseph Crail
9e500532d0
Merge pull request #837 from skade/move_to_stable
...
Move to stable
2016-03-22 20:47:41 -04:00
Florian Gilcher
d75cb627c9
Remove nightly note
2016-03-22 22:03:16 +01:00
Florian Gilcher
0be3e61d9f
Avoid using char() in tr
2016-03-22 22:03:06 +01:00
Florian Gilcher
2befeef179
Remove use of str_char in fmt
2016-03-22 21:57:52 +01:00
Jamie Turner
7d89717d4b
Fix sleep duration calculations.
...
Durations longer than ~4s were overflowing u32 and just.. not working.
2016-03-22 13:00:01 -07:00
Florian Gilcher
509d6efc78
Remove rustc_unicode dependency
2016-03-22 19:56:14 +01:00
Michael Gehring
6e629b1115
Merge pull request #832 from fitzgen/tail-large-files
...
Tail large files
2016-03-22 01:57:06 +01: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