Commit graph

3841 commits

Author SHA1 Message Date
Tyler
ead3c8c8fc Project structure refactor.
- Unit tests split into individual folders
- Parseargs test module renamed unit_tests to match new structure
2021-06-01 12:53:23 -07:00
Tyler
391a175dbb Fix regression in converison logic. 2021-06-01 12:34:15 -07:00
Tyler
48374ab0a2 Imlements block. All tests passing. 2021-06-01 11:39:18 -07:00
Tyler
f2fa1e1be1 Adds additional test resources & unit tests for block. 2021-05-29 15:22:42 -07:00
Tyler
d0b4fe34c1 Refactor. Returns code to buildable
- Pushes file/stdout specific logic to trait objects.
- Extracts read/write helper
- Extracts conv/block/unblock helper
- Impl block
- WIP: Many failing tests!
2021-05-27 15:55:29 -07:00
Tyler
d97672dfd3 Continues impl
- Completes impl of skip=N, and seek=N
- Parses cbs=N
2021-04-27 12:21:35 -07:00
Tyler
4d7be2f098 Implements functionality for seeking output files
- Adds duplicate dd fn :-( for differentiating between File backed and
  non-File outputs.
- Implements cflag=sparse,fsync,fdatasync which were previously blocked.
- Adds plumbing for IFlags & OFlags incl parsing.
- Partial impl for seek=N and skip=N which were previously blocked.
2021-04-26 15:17:48 -07:00
Tyler
3c3af72d9a Implements noerror (ignores read errors) 2021-04-22 14:14:32 -07:00
Tyler
beb7abcff0 Implements swab. Adds odd & even tests. 2021-04-22 13:19:51 -07:00
Tyler
5aabdf854d Adds plumbing for conv=sparse. Not impl.
- conv=sparse option requires knowledge of File/Stdout to change
  behaviour.
- Unclear how best to impl this.
- Possible option: develop 4 versions of dd<X,Y> for each valid pair of { File, Stdin,
  Stdout }.
2021-04-22 10:56:33 -07:00
Tyler
b461f102cc Testt conv arg parsing. 2021-04-21 15:24:14 -07:00
Tyler
7f7dd2ad4e Improves multiplier tests 2021-04-08 19:14:26 -07:00
Tyler
9e933a3860 Completes refactor & clean-up. Implements full conv flag parsing.
- All conv flags now parsed (full functionality is TODO)
- Changes functionality of eg. conv=ebcdic,ucase to match gnudd
2021-04-08 19:07:52 -07:00
Tyler
5c8c7efe68 Starts arg parsing. Cleans & refactors.
- Moves all arg parsing & tests to parseargs.rs
- Moves conversion tables to conversion_tables.rs
- Adds ebcdic_lcase and _ucase tables
- Refactors options: This **Breaks Write for Output**
2021-04-06 20:44:37 -07:00
Tyler
4996308753 Builds out arg parsing. Adds support for if, of, & multiplier strings)
- Adds support for calling dd fn from cl
- Adds basic cl tests from project root
- Adds support for multiplier strings (c, w, b, kB, KB, KiB, ... EB, E,
  EiB.
2021-04-03 12:59:03 -07:00
Tyler
0df457596c Implements conversions:- ascii, ebcdic, ibm, lcase, ucase- adds (simple) tests for conversions 2021-03-25 18:32:47 -07:00
ty
d6086fc649 Adds impl & tests
- implements basic copy & progress functionality
- rough work for conversion tables
- adds sanity tests (mt, zeros, ones, deadbeef & rand)
2021-03-18 14:38:08 -07:00
ty
28e6d0d385 Develop prototype code
- Move code closer to real impl
- Remove Makefile from repo
2021-03-16 19:39:22 -07:00
ty
5271427193 Merge branch 'master' of github.com:backwaterred/coreutils into implement-dd-bwtr 2021-03-16 14:37:01 -07:00
ty
af6bf3a224 Begins work on dd
- Prototype code.
- Adds project boilerplate for integration with coreutils framework.
2021-03-16 14:32:55 -07:00
Sylvestre Ledru
618d4a4fa5
Merge pull request #1825 from cbjadwani/uniq-utf8-issues
uniq: utf-8 issues
2021-03-16 21:18:31 +01:00
Sylvestre Ledru
edf5970b99
Merge pull request #1830 from gtsiam/travis
travis: bump rust to 1.33.0
2021-03-15 21:46:28 +01:00
George Tsiamasiotis
1169b92dd6 travis: bump rust to 1.33.0
Follow-up to #1724 where the minimum Rust version was bumped to v1.33.0
2021-03-15 21:45:22 +02:00
Sylvestre Ledru
ca540d949c
Merge pull request #1824 from NotNorom/master
sleep: Add more test cases
2021-03-15 20:43:02 +01:00
Andre Julius
53c3fedf33 sleep: Add more test cases
As mentioned here:
https://github.com/uutils/coreutils/pull/1777#discussion_r593807712
2021-03-15 14:36:38 +01:00
Chirag Jadwani
116e253cc0 uniq: Fix skip fields
Current implementation of the skip fields logic does not handle
multibyte code points correctly. It assumes each code point (`char`) is
one byte. If the skipped part of the input line has any multibyte code
points then this can cause fields not being skipped correctly (field
start index is calculated to be before it actually starts).
2021-03-15 18:48:54 +05:30
Chirag Jadwani
ce4342d12e uniq: Fix panic on invalid utf-8 input 2021-03-15 18:48:54 +05:30
Sylvestre Ledru
4574b2b58d README.md: remove broken information 2021-03-15 10:24:16 +01:00
Sylvestre Ledru
15db3c99c4 README.md: add the crates.io badge 2021-03-15 10:04:09 +01:00
Sylvestre Ledru
10d55c5696
Merge pull request #1796 from ttrunck/fix-busytest
Fix `make busytest`
2021-03-14 20:58:05 +01:00
Theophile Trunck
0ac5dbe44d Add CICD for busytest 2021-03-14 20:30:53 +01:00
Sylvestre Ledru
19b7b09bd7
Update cargo.lock (#1819) 2021-03-14 11:09:11 +01:00
Sylvestre Ledru
2c09556964 rustfmt some tests 2021-03-13 23:30:47 +01:00
Andre Julius
2158b2c5b4
sleep: move from getopts to clap #1735 (#1777)
and Add some sleep test cases #1735
2021-03-13 23:11:11 +01:00
Terts Diepraam
fd5ec099d0
touch: use an ArgGroup for sources and turn macros into functions (#1813)
* touch: use arggroup for sources

* tests/touch: add tests for multiple sources

* touch: turn macros into functions

* test/touch: fmt

* touch: constant for the sources ArgGroup
2021-03-13 17:20:39 +01:00
Sylvestre Ledru
cd4003007f refresh cargo.lock with updates 2021-03-12 23:10:12 +01:00
Jan Scheer
47f50a0f5f
tests/utils: fixed mode for write (#1802)
added `log_info`
2021-03-12 22:26:27 +01:00
Michael Kefeder
e1626b8c64
ptx: ignore empty regex (#1808)
* ptx: ignore empty -W regex

* ptx: test to verify empty -W regex is ignored

* tests/ptx: verify word regexp from cmd-line is used
2021-03-12 21:52:37 +01:00
Ali
5ced3a670b
paste: cleanup multi-stdin support (#1803)
cleaner impl for multi-stdin support
2021-03-12 13:26:09 +01:00
Craig Pastro
3ab114f283
cp: Implement --parents & --parent (#1797) 2021-03-12 13:25:15 +01:00
Theophile Trunck
8bafcbab7a Update the binary usage to match busybox
New tests in busybox are based on the fact that the function
appears in the usage of the busybox binary.
Because the tests are searching for an exact string they don't see
the function defined by coreutils.
By using the exact same string as busybox we can now also run the new
busybox tests
2021-03-10 23:52:33 +01:00
Ali
374a4fde86
paste: support multi-stdin (#1791)
- added `-` as the default input, since `paste` reads stdin if no file
is provided
- `paste` also supports providing `-` multiple times
- added a test for it
2021-03-10 23:19:12 +01:00
Theophile Trunck
9ab8bb5db5 Fix make busytest
The binary was rename from uutils to coreutils in that commit
52ae491fcd
but the makefile to run the busybox test wasn't updated

This commit update the makefile to use the correct binary name.
It also update the busybox to the 1.32.1 version and fix the makefile
to run all the busybox tests instead of stopping after the failed exe
2021-03-10 23:13:57 +01:00
Mikadore
734ef0a8a1
uniq: fixed #550 (#1790) 2021-03-10 21:54:31 +01:00
Sylvestre Ledru
a42e24e088
Merge pull request #1786 from jeckersb/clippy-cleanup
Fix some clippy warnings
2021-03-10 15:32:27 +01:00
John Eckersberg
08eb56f120 Fix some clippy warnings 2021-03-10 08:42:00 -05:00
Sylvestre Ledru
476a3d42da
Merge pull request #1789 from ali5h/paste-clap
paste: update cargo lock file
2021-03-10 11:24:43 +01:00
Ali Shariat
62388faab8
paste: update cargo lock file
missed from #1785
2021-03-10 02:04:37 -08:00
Sylvestre Ledru
517b2a6a22
Merge pull request #1767 from FelipeLema/mod_opt
Group OPT_ARGUMENTS into mods
2021-03-09 22:57:30 +01:00
Sylvestre Ledru
955b7ee6d5
Merge pull request #1785 from ali5h/paste-clap
paste: move from getopts to clap
2021-03-09 22:52:16 +01:00