Commit graph

14 commits

Author SHA1 Message Date
Sunrin SHIMURA (keen)
ee34206520 install: allow to install a file to a file 2017-12-27 17:31:19 +09:00
Alex Lyon
6829ca3d10
chmod, install: move mode parsing into uucore 2017-12-10 20:11:05 -08:00
shutefan
38cd8edb5b install: add high bits to file permissions in tests 2017-12-08 20:54:59 +01:00
nathanross
aa6ee03be3 tests: remove helper function boilerplate via macros 2016-08-23 08:04:02 -04:00
Nathan Ross
36503a77c7 impl: use coreopts for brevity and consistent UX 2016-08-20 10:07:24 -04:00
Nathan Ross
99b39e4237 tests: normalize around chaining asserts
Although for some tests this adds characters
we still use them there because the
brevity cost is now worth the benefit in
terms of instant, natural-language readability
and recognizability for people not familiar
with this tests of this module or even the project
2016-08-13 17:59:21 -04:00
Knight
a23f1a13e7 Remove useless crates 2016-08-07 01:23:49 +08:00
Nathan Ross
569cd162d3 tests: refactor conventional TestScenario usage
Updates to individual integration tests

  - use proposed conventional approach to beginning tests

  - use new convenience functions for using fixtures

  - use new names for TestScenario

Updates to integration test modules

  - add proposed conventional module-level functions

Updates to test/common/util.rs

  - rename TestSet, and its methods, for semantic clarity

  - create convenience functions for use of fixtures

  - delete convenience functions obsoleted by new conventions
2016-08-01 13:42:00 -04:00
Ben Eills
fa2145bb84 Allow specification of mode strings for install
We now accept symbolic and numeric mode strings using the
--mode or -m option for install.  This is used either when
moving files into a directory, or when creating component
directories with the -d option.  This feature was designed
to mirror the GNU implementation, including the possibly
quirky behaviour of `install --mode=u+wx file dir`
resulting in dir/file having exactly permissions 0300.

Extensive integration tests are included.

This chnage required a higher libc dependency.
2016-07-13 15:29:24 +02:00
Ben Eills
b15fff6269 Implement creation of component directories (-d option)
Tested in two integration test:

 - One creating three component directories
 - One trying to create an already existing directory
2016-07-13 12:56:30 +02:00
Ben Eills
823ffbd1dd Copy rather than move files
Test this with one integration test.  Also document functions
and add an '(unimplemented)' marker to some arguments in help.
2016-07-13 12:27:11 +02:00
Ben Eills
a5d97323db Test for unimplemented command line arguments
We check if the user has given one of the (many)
not yet implemented command line arguments.  Upon
catching this, we display the specific transgressor
to stderr and exit with return code 2.

This behaviour is tested in one new integration test.
2016-07-13 10:37:08 +02:00
Ben Eills
8a5719561d Implement basic installation of file to directory
Bare minimum functionality of `install file dir` implemented.
Also added TODO markers in code for outstanding parameters
and split main function into smaller logical chunks.
2016-07-12 22:58:44 +02: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