mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 05:57:46 +00:00
Addresses build errors
- Adds words to cspell exceptions - Converts test macros to use Default trait. - Converts parser to use Default trait. - Adds Windows-friendly test files for block/unblock when nl is present in test/spec file.
This commit is contained in:
parent
989849eca7
commit
885a875552
17 changed files with 272 additions and 257 deletions
|
@ -213,27 +213,12 @@ fn test_excl_causes_failure_when_present() {
|
|||
.fails();
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_atime_updated() {
|
||||
let fname = "this-file-exists-no-noatime.txt";
|
||||
assert_fixture_exists!(&fname);
|
||||
|
||||
let (fix, mut ucmd) = at_and_ucmd!();
|
||||
ucmd.args(&["status=none", inf!(fname)]);
|
||||
|
||||
let pre_atime = fix.metadata(fname).accessed().unwrap();
|
||||
|
||||
ucmd.pipe_in("").run().no_stderr().success();
|
||||
std::thread::sleep(std::time::Duration::from_millis(10));
|
||||
|
||||
let post_atime = fix.metadata(fname).accessed().unwrap();
|
||||
assert!(pre_atime != post_atime);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_noatime_does_not_update_infile_atime() {
|
||||
// NOTE: Not all environments support tracking access time. If this
|
||||
// test fails on some systems and passes on others, assume the functionality
|
||||
// is not working and the systems that pass it simply don't update file access time.
|
||||
let fname = "this-ifile-exists-noatime.txt";
|
||||
assert_fixture_exists!(&fname);
|
||||
|
||||
|
@ -251,6 +236,9 @@ fn test_noatime_does_not_update_infile_atime() {
|
|||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_noatime_does_not_update_ofile_atime() {
|
||||
// NOTE: Not all environments support tracking access time. If this
|
||||
// test fails on some systems and passes on others, assume the functionality
|
||||
// is not working and the systems that pass it simply don't update file access time.
|
||||
let fname = "this-ofile-exists-noatime.txt";
|
||||
assert_fixture_exists!(&fname);
|
||||
|
||||
|
|
23
tests/fixtures/dd/cspell.json
vendored
23
tests/fixtures/dd/cspell.json
vendored
|
@ -1,6 +1,29 @@
|
|||
{
|
||||
"version": "0.1",
|
||||
"language": "en",
|
||||
"words": [
|
||||
"fname",
|
||||
"fpath",
|
||||
"specfile",
|
||||
"testfile",
|
||||
"iflag",
|
||||
"iflags",
|
||||
"oflag",
|
||||
"oflags",
|
||||
"noxfer",
|
||||
"nocreat",
|
||||
"noatime",
|
||||
"infile",
|
||||
"outfile",
|
||||
"unspec",
|
||||
"fullblock",
|
||||
"urand",
|
||||
"tname",
|
||||
"fileio",
|
||||
"gibi",
|
||||
"ucase",
|
||||
"lcase"
|
||||
],
|
||||
"ignorePaths": [
|
||||
"*.txt",
|
||||
"*.spec"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue