Commit graph

2261 commits

Author SHA1 Message Date
Knight
78f9351e71 mknod: correct the help 2016-05-07 16:12:01 +08:00
Knight
948675b0e3 README: remove mknod from TODO list 2016-05-07 16:10:48 +08:00
Knight
467561da36 mknod: implemented 2016-05-07 15:21:37 +08:00
Knight
79478626da add mknod 2016-05-07 15:21:37 +08:00
Heather
1fafde8c27 Merge pull request #845 from peschkaj/master
Basic implementation of ls
2016-05-01 00:56:11 +04:00
Heather
f47fafb28d Merge pull request #830 from lucaotta/fix-788
Fix #788
2016-05-01 00:41:15 +04:00
Heather
57693af48d Merge pull request #871 from modelorganism/odupdate
add functionality to od
2016-05-01 00:34:24 +04:00
modelorganism
caebd834c6 od: fix failing test unable to find temp dir on linux 2016-04-29 20:17:51 -05:00
modelorganism
3f356a4190 od: take input from stdin, as well as files. 2016-04-26 23:17:00 -05:00
modelorganism
365b342792 od: create first tests for od 2016-04-25 22:06:38 -05:00
modelorganism
e6cf167d1d od: Accept multiple files names as input 2016-04-25 21:55:34 -05:00
modelorganism
1fbda9663d Add extra spaces to output to match formating of origial od 2016-04-25 21:47:24 -05:00
Heather
5fae29ad6c Merge pull request #869 from chungy/sha3
hashsum: add support for SHA-3 functions
2016-04-16 17:33:28 +04:00
Mike Swanson
c946202094 hashsum: add support for SHA-3 functions
Only the fixed output-size functions are supported, SHAKE128 and
SHAKE256 are not included for now.
2016-04-16 06:17:15 -07:00
Heather
e0c55b65a8 Merge pull request #868 from ebfe/od
od: fix infinite loop at EOF
2016-04-15 15:04:16 +04:00
Michael Gehring
77d1c309cd od: fix infinite loop at EOF
Fixes #866
2016-04-15 07:41:03 +02:00
Heather
2ab055445b Merge pull request #863 from ProgVal/patch-1
Revert unwanted change
2016-04-08 00:17:34 +04:00
Valentin Lorentz
57c928fe4f Revert unwanted change
introduced in 8ff308740c
2016-04-07 22:02:52 +02:00
Heather
02779fd3d2 Merge pull request #861 from ProgVal/test-tail-f
tail: Add test for `tail -f`.
2016-04-07 23:49:33 +04:00
Valentin Lorentz
8ff308740c Fix test on Rust Stable.
https://github.com/rust-lang/rust/issues/32801
2016-04-07 20:54:22 +02:00
Valentin Lorentz
e673a102b6 tail: Add test for tail -f. 2016-04-03 11:47:33 +02:00
Valentin Lorentz
4ba6ea7aad tests: Move part of UCommand::run to a new function 2016-04-03 11:46:33 +02:00
Valentin Lorentz
fe5bc47971 tests: Simplify logic of UCommand::run. 2016-04-03 11:46:33 +02:00
Heather
b3b8a1ea54 Merge pull request #862 from fitzgen/tail-size-multiplier-suffix
tail: Clean up and test suffix multiplier
2016-04-03 01:59:24 +04:00
Nick Fitzgerald
3972c6eb53 tail: Clean up and test suffix multiplier
Makes `parse_size` return a `Result` where the `Err` part indicates whether
there was a parsing error, or the parse size is too big to store. Also makes the
value parsed a `u64` rather than a `usize`.

Adds unit tests for `parse_size` and integration tests using the suffix
multiplier in a number passed with the `-n` flag.
2016-04-02 14:16:11 -07:00
Heather
ed6c87b3d3 Merge pull request #858 from ProgVal/implement-tail-z
tail: Implement `tail -z`.
2016-04-02 15:07:37 +04:00
Valentin Lorentz
2fd7164cda tail: Implement tail -z.
This options makes tail use NULL instead of newline as a line
delimiter.
2016-04-02 12:32:33 +02:00
Luca Ottaviano
f0186271ec tests/chmod: add test with both reference and symbolic mode
Only reference should be taken into account.
2016-04-02 10:30:19 +02:00
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