diff --git a/src/uu/cksum/src/cksum.rs b/src/uu/cksum/src/cksum.rs index 3d814ae6f24..70c80ae37c7 100644 --- a/src/uu/cksum/src/cksum.rs +++ b/src/uu/cksum/src/cksum.rs @@ -164,7 +164,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { // Set the default algorithm to CRC when not '--check'ing. let algo_kind = algo_cli.unwrap_or(AlgoKind::Crc); - let tag = matches.get_flag(options::TAG) || !matches.get_flag(options::UNTAGGED); + let tag = !matches.get_flag(options::UNTAGGED); // Making TAG default at clap blocks --untagged let binary = matches.get_flag(options::BINARY); let algo = SizedAlgoKind::from_unsized(algo_kind, length)?; diff --git a/src/uu/pr/src/pr.rs b/src/uu/pr/src/pr.rs index fde2370480b..843b3b8f970 100644 --- a/src/uu/pr/src/pr.rs +++ b/src/uu/pr/src/pr.rs @@ -1180,34 +1180,23 @@ fn header_content(options: &OutputOptions, page: usize) -> Vec { // Use the line width if available, otherwise use default of 72 let total_width = options.line_width.unwrap_or(DEFAULT_COLUMN_WIDTH); - // GNU pr uses a specific layout: - // Date takes up the left part, filename is centered, page is right-aligned let date_len = date_part.chars().count(); let filename_len = filename.chars().count(); let page_len = page_part.chars().count(); let header_line = if date_len + filename_len + page_len + 2 < total_width { - // Check if we're using a custom date format that needs centered alignment - // This preserves backward compatibility while fixing the GNU time-style test - if date_part.starts_with('+') { - // GNU pr uses centered layout for headers with custom date formats - // The filename should be centered between the date and page parts - let space_for_filename = total_width - date_len - page_len; - let padding_before_filename = (space_for_filename - filename_len) / 2; - let padding_after_filename = - space_for_filename - filename_len - padding_before_filename; - - format!( - "{date_part}{:width1$}{filename}{:width2$}{page_part}", - "", - "", - width1 = padding_before_filename, - width2 = padding_after_filename - ) - } else { - // For standard date formats, use simple spacing for backward compatibility - format!("{date_part} {filename} {page_part}") - } + // The filename should be centered between the date and page parts + let space_for_filename = total_width - date_len - page_len; + let padding_before_filename = (space_for_filename - filename_len) / 2; + let padding_after_filename = space_for_filename - filename_len - padding_before_filename; + + format!( + "{date_part}{:width1$}{filename}{:width2$}{page_part}", + "", + "", + width1 = padding_before_filename, + width2 = padding_after_filename + ) } else { // If content is too long, just use single spaces format!("{date_part} {filename} {page_part}") diff --git a/src/uu/touch/locales/en-US.ftl b/src/uu/touch/locales/en-US.ftl index 985f7cca193..2f046acad39 100644 --- a/src/uu/touch/locales/en-US.ftl +++ b/src/uu/touch/locales/en-US.ftl @@ -17,7 +17,7 @@ touch-error-missing-file-operand = missing file operand Try '{ $help_command } --help' for more information. touch-error-setting-times-of = setting times of { $filename } touch-error-setting-times-no-such-file = setting times of { $filename }: No such file or directory -touch-error-cannot-touch = cannot touch { $filename } +touch-error-cannot-touch = cannot touch { $filename }: { $error } touch-error-no-such-file-or-directory = No such file or directory touch-error-failed-to-get-attributes = failed to get attributes of { $path } touch-error-setting-times-of-path = setting times of { $path } diff --git a/src/uu/touch/locales/fr-FR.ftl b/src/uu/touch/locales/fr-FR.ftl index 7ca2f995bfb..914f23b4428 100644 --- a/src/uu/touch/locales/fr-FR.ftl +++ b/src/uu/touch/locales/fr-FR.ftl @@ -18,7 +18,7 @@ touch-error-missing-file-operand = opérande de fichier manquant Essayez '{ $help_command } --help' pour plus d'informations. touch-error-setting-times-of = définition des temps de { $filename } touch-error-setting-times-no-such-file = définition des temps de { $filename } : Aucun fichier ou répertoire de ce type -touch-error-cannot-touch = impossible de toucher { $filename } +touch-error-cannot-touch = impossible de toucher { $filename }: { $error } touch-error-no-such-file-or-directory = Aucun fichier ou répertoire de ce type touch-error-failed-to-get-attributes = échec d'obtention des attributs de { $path } touch-error-setting-times-of-path = définition des temps de { $path } diff --git a/src/uu/touch/src/touch.rs b/src/uu/touch/src/touch.rs index bde22ab336a..87d9851f2a0 100644 --- a/src/uu/touch/src/touch.rs +++ b/src/uu/touch/src/touch.rs @@ -17,17 +17,19 @@ use clap::{Arg, ArgAction, ArgGroup, ArgMatches, Command}; use filetime::{FileTime, set_file_times, set_symlink_file_times}; use jiff::{Timestamp, Zoned}; use std::borrow::Cow; -use std::ffi::{OsStr, OsString}; -use std::fs::{self, File}; -use std::io::{Error, ErrorKind}; +use std::ffi::OsString; +use std::fs; +use std::io::ErrorKind; +#[cfg(unix)] +use std::os::unix::fs::OpenOptionsExt; use std::path::{Path, PathBuf}; use uucore::display::Quotable; -use uucore::error::{FromIo, UResult, USimpleError}; -#[cfg(target_os = "linux")] +use uucore::error::{FromIo, UIoError, UResult, USimpleError}; +use uucore::format_usage; +#[cfg(any(unix, target_os = "macos"))] use uucore::libc; use uucore::parser::shortcut_value_parser::ShortcutValueParser; -use uucore::translate; -use uucore::{format_usage, show}; +use uucore::{show, translate}; use crate::error::TouchError; @@ -417,13 +419,19 @@ pub fn touch(files: &[InputFile], opts: &Options) -> Result<(), TouchError> { InputFile::Stdout => (Cow::Owned(pathbuf_from_stdout()?), true), InputFile::Path(path) => (Cow::Borrowed(path), false), }; - touch_file(&path, is_stdout, opts, atime, mtime).map_err(|e| { + if let Err(e) = touch_file(&path, is_stdout, opts, atime, mtime).map_err(|e| { TouchError::TouchFileError { path: path.into_owned(), index: ind, error: e, } - })?; + }) { + if opts.strict { + return Err(e); + } + // If not in strict mode, show the error, but move to the next file. + show!(e); + } } Ok(()) @@ -444,70 +452,57 @@ fn touch_file( atime: FileTime, mtime: FileTime, ) -> UResult<()> { - let filename = if is_stdout { - OsStr::new("-") - } else { - path.as_os_str() - }; - - let metadata_result = if opts.no_deref { - path.symlink_metadata() - } else { - path.metadata() - }; - - if let Err(e) = metadata_result { - if e.kind() != ErrorKind::NotFound { - return Err(e.map_err_context( - || translate!("touch-error-setting-times-of", "filename" => filename.quote()), - )); - } - - if opts.no_create { - return Ok(()); - } - - if opts.no_deref { - let e = USimpleError::new( - 1, - translate!("touch-error-setting-times-no-such-file", "filename" => filename.quote()), - ); - if opts.strict { - return Err(e); - } - show!(e); - return Ok(()); - } - - if let Err(e) = File::create(path) { - // we need to check if the path is the path to a directory (ends with a separator) - // we can't use File::create to create a directory - // we cannot use path.is_dir() because it calls fs::metadata which we already called - // when stable, we can change to use e.kind() == std::io::ErrorKind::IsADirectory - let is_directory = if let Some(last_char) = path.to_string_lossy().chars().last() { - last_char == std::path::MAIN_SEPARATOR - } else { - false - }; - if is_directory { - let custom_err = Error::other(translate!("touch-error-no-such-file-or-directory")); - return Err(custom_err.map_err_context( - || translate!("touch-error-cannot-touch", "filename" => filename.quote()), - )); - } - let e = e.map_err_context( - || translate!("touch-error-cannot-touch", "filename" => path.quote()), - ); - if opts.strict { - return Err(e); - } - show!(e); - return Ok(()); - } + // A symlink must exist to set its times, even with -h/--no-dereference. + // We get "setting times of" error later if it doesn't exist. This is + // handled by update_times() and is consistent with GNU. + if opts.no_create || opts.no_deref { + return update_times(path, is_stdout, opts, atime, mtime); + } - // Minor optimization: if no reference time, timestamp, or date was specified, we're done. - if opts.source == Source::Now && opts.date.is_none() { - return Ok(()); + // Use OpenOptions to create the file if it doesn't exist. This is used in lieu of + // stat() to avoid TOCTOU issues. + + #[cfg(not(unix))] + let touched_file = fs::OpenOptions::new() + .create(true) + .write(true) + .truncate(false) + .open(path); + + // We need to add UNIX flags O_NOCTTY and O_NONBLOCK to match GNU `touch` behavior when + // on UNIX systems. Without O_NONBLOCK, opening something like a FIFO would block indefinitely. + #[cfg(unix)] + let touched_file = fs::OpenOptions::new() + .create(true) + .write(true) + .truncate(false) + // Use custom flags on UNIX targets to add O_NOCTTY and O_NONBLOCK. O_NONBLOCK is + // necessary for special files like a FIFO to avoid blocking behavior. + .custom_flags(libc::O_NOCTTY | libc::O_NONBLOCK) + .open(path); + + if let Err(e) = touched_file { + // We have to check to see if the reason .open() failed above is something + // that is fatal or something expected. The former is handled here, whereas + // the latter is handled in update_times(). + let err_good_cause = e.kind() != ErrorKind::IsADirectory; + + // For UNIX/MAC, we also have to check special files, like FIFOs. + // If we can't unwrap a raw OS error, default it to 0 so that it's considered true + // for the first Boolean condition. + #[cfg(any(unix, target_os = "macos"))] + let err_good_cause = e.raw_os_error().unwrap_or(0) != libc::ENXIO && err_good_cause; + + // err_good_cause indicates that the error is not one we should ignore + if err_good_cause { + return Err(TouchError::TouchFileError { + path: path.to_owned(), + index: 0, + error: USimpleError::new( + 1, + translate!("touch-error-cannot-touch", "filename" => path.quote(), "error" => UIoError::from(e)), + ), + }.into()); } } @@ -579,12 +574,31 @@ fn update_times( // sets the file access and modification times for a file or a symbolic link. // The filename, access time (atime), and modification time (mtime) are provided as inputs. - if opts.no_deref && !is_stdout { + let result = if opts.no_deref && !is_stdout { set_symlink_file_times(path, atime, mtime) } else { set_file_times(path, atime, mtime) + }; + + // Originally, the metadata stat() in touch_file() would catch "no create", + // but since it was removed to fix TOCTOU issues, we need to handle it here. + if let Err(ref e) = result { + if opts.no_create && e.kind() != ErrorKind::NotADirectory { + #[cfg(any(unix, target_os = "macos"))] + if e.raw_os_error() != Some(libc::ELOOP) { + // ELOOP is returned when trying to stat a dangling symlink with -h/--no-dereference. + // However, the ErrorKind is unstable in Rust, so we have to kind + // of hack it like this. + return Ok(()); + } + #[cfg(not(any(unix, target_os = "macos")))] + return Ok(()); + } + return result.map_err_context( + || translate!("touch-error-setting-times-of-path", "path" => path.quote()), + ); } - .map_err_context(|| translate!("touch-error-setting-times-of-path", "path" => path.quote())) + Ok(()) } /// Get metadata of the provided path diff --git a/src/uu/uniq/src/uniq.rs b/src/uu/uniq/src/uniq.rs index 3845ba459ea..9c95305e4be 100644 --- a/src/uu/uniq/src/uniq.rs +++ b/src/uu/uniq/src/uniq.rs @@ -61,8 +61,6 @@ struct Uniq { struct LineMeta { key_start: usize, key_end: usize, - lowercase: Vec, - use_lowercase: bool, } macro_rules! write_line_terminator { @@ -152,18 +150,7 @@ impl Uniq { return first_slice != second_slice; } - let first_cmp = if first_meta.use_lowercase { - first_meta.lowercase.as_slice() - } else { - first_slice - }; - let second_cmp = if second_meta.use_lowercase { - second_meta.lowercase.as_slice() - } else { - second_slice - }; - - first_cmp != second_cmp + !first_slice.eq_ignore_ascii_case(second_slice) } fn key_bounds(&self, line: &[u8]) -> (usize, usize) { @@ -230,20 +217,6 @@ impl Uniq { let (key_start, key_end) = self.key_bounds(line); meta.key_start = key_start; meta.key_end = key_end; - - if self.ignore_case && key_start < key_end { - let slice = &line[key_start..key_end]; - if slice.iter().any(|b| b.is_ascii_uppercase()) { - meta.lowercase.clear(); - meta.lowercase.reserve(slice.len()); - meta.lowercase - .extend(slice.iter().map(|b| b.to_ascii_lowercase())); - meta.use_lowercase = true; - return; - } - } - - meta.use_lowercase = false; } fn read_line( diff --git a/src/uucore/src/lib/features/checksum/mod.rs b/src/uucore/src/lib/features/checksum/mod.rs index 2f3d28b4121..7cf7fe129fa 100644 --- a/src/uucore/src/lib/features/checksum/mod.rs +++ b/src/uucore/src/lib/features/checksum/mod.rs @@ -374,9 +374,6 @@ pub enum ChecksumError { #[error("the --raw option is not supported with multiple files")] RawMultipleFiles, - #[error("the --{0} option is meaningful only when verifying checksums")] - CheckOnlyFlag(String), - // --length sanitization errors #[error("--length required for {}", .0.quote())] LengthRequired(String), diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs index 5f4a44c4aff..f0ad9d8ca38 100644 --- a/tests/by-util/test_cp.rs +++ b/tests/by-util/test_cp.rs @@ -7444,3 +7444,28 @@ fn test_cp_archive_deref_flag_ordering() { assert_eq!(at.is_symlink(&dest), expect_symlink, "failed for {flags}"); } } + +/// Test that copying to an existing file maintains its permissions, unix only because .mode() only +/// works on Unix +#[test] +#[cfg(unix)] +fn test_cp_to_existing_file_permissions() { + let (at, mut ucmd) = at_and_ucmd!(); + + at.touch("src"); + at.touch("dst"); + + let src_path = at.plus("src"); + let dst_path = at.plus("dst"); + + let mut src_permissions = std::fs::metadata(&src_path).unwrap().permissions(); + src_permissions.set_readonly(true); + std::fs::set_permissions(&src_path, src_permissions).unwrap(); + + let dst_mode = std::fs::metadata(&dst_path).unwrap().permissions().mode(); + + ucmd.args(&["src", "dst"]).succeeds(); + + let new_dst_mode = std::fs::metadata(&dst_path).unwrap().permissions().mode(); + assert_eq!(dst_mode, new_dst_mode); +} diff --git a/tests/by-util/test_pr.rs b/tests/by-util/test_pr.rs index 26f64e1dc5e..63063a7e732 100644 --- a/tests/by-util/test_pr.rs +++ b/tests/by-util/test_pr.rs @@ -5,6 +5,7 @@ // spell-checker:ignore (ToDO) Sdivide use chrono::{DateTime, Duration, Utc}; +use regex::Regex; use std::fs::metadata; use uutests::new_ucmd; use uutests::util::UCommand; @@ -78,21 +79,22 @@ fn test_with_numbering_option_with_number_width() { #[test] fn test_with_long_header_option() { - let test_file_path = "test_one_page.log"; - let expected_test_file_path = "test_one_page_header.log.expected"; - let header = "new file"; - for args in [&["-h", header][..], &["--header=new file"][..]] { - let mut scenario = new_ucmd!(); - let value = file_last_modified_time(&scenario, test_file_path); - scenario - .args(args) - .arg(test_file_path) - .succeeds() - .stdout_is_templated_fixture( - expected_test_file_path, - &[("{last_modified_time}", &value), ("{header}", header)], - ); - } + let whitespace = " ".repeat(21); + let blank_lines = "\n".repeat(61); + let datetime_pattern = r"\d\d\d\d-\d\d-\d\d \d\d:\d\d"; + let pattern = + format!("\n\n{datetime_pattern}{whitespace}new file{whitespace}Page 1\n\n\na{blank_lines}"); + let regex = Regex::new(&pattern).unwrap(); + new_ucmd!() + .args(&["-h", "new file"]) + .pipe_in("a") + .succeeds() + .stdout_matches(®ex); + new_ucmd!() + .args(&["--header=new file"]) + .pipe_in("a") + .succeeds() + .stdout_matches(®ex); } #[test] @@ -400,99 +402,92 @@ fn test_with_offset_space_option() { #[test] fn test_with_date_format() { - let test_file_path = "test_one_page.log"; - let expected_test_file_path = "test_one_page.log.expected"; - let mut scenario = new_ucmd!(); - let value = file_last_modified_time_format(&scenario, test_file_path, "%Y__%s"); - scenario - .args(&[test_file_path, "-D", "%Y__%s"]) + let whitespace = " ".repeat(50); + let blank_lines = "\n".repeat(61); + let datetime_pattern = r"\d{4}__\d{10}"; + let pattern = format!("\n\n{datetime_pattern}{whitespace}Page 1\n\n\na{blank_lines}"); + let regex = Regex::new(&pattern).unwrap(); + new_ucmd!() + .args(&["-D", "%Y__%s"]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture(expected_test_file_path, &[("{last_modified_time}", &value)]); + .stdout_matches(®ex); // "Format" doesn't need to contain any replaceable token. + let whitespace = " ".repeat(60); + let blank_lines = "\n".repeat(61); new_ucmd!() - .args(&[test_file_path, "-D", "Hello!"]) + .args(&["-D", "Hello!"]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture( - expected_test_file_path, - &[("{last_modified_time}", "Hello!")], - ); + .stdout_only(format!("\n\nHello!{whitespace}Page 1\n\n\na{blank_lines}")); // Long option also works new_ucmd!() - .args(&[test_file_path, "--date-format=Hello!"]) + .args(&["--date-format=Hello!"]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture( - expected_test_file_path, - &[("{last_modified_time}", "Hello!")], - ); + .stdout_only(format!("\n\nHello!{whitespace}Page 1\n\n\na{blank_lines}")); // Option takes precedence over environment variables new_ucmd!() .env("POSIXLY_CORRECT", "1") .env("LC_TIME", "POSIX") - .args(&[test_file_path, "-D", "Hello!"]) + .args(&["--date-format=Hello!"]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture( - expected_test_file_path, - &[("{last_modified_time}", "Hello!")], - ); + .stdout_only(format!("\n\nHello!{whitespace}Page 1\n\n\na{blank_lines}")); } #[test] fn test_with_date_format_env() { - const POSIXLY_FORMAT: &str = "%b %e %H:%M %Y"; - // POSIXLY_CORRECT + LC_ALL/TIME=POSIX uses "%b %e %H:%M %Y" date format - let test_file_path = "test_one_page.log"; - let expected_test_file_path = "test_one_page.log.expected"; - let mut scenario = new_ucmd!(); - let value = file_last_modified_time_format(&scenario, test_file_path, POSIXLY_FORMAT); - scenario + let whitespace = " ".repeat(49); + let blank_lines = "\n".repeat(61); + let datetime_pattern = r"[A-Z][a-z][a-z] [ \d]\d \d\d:\d\d \d{4}"; + let pattern = format!("\n\n{datetime_pattern}{whitespace}Page 1\n\n\na{blank_lines}"); + let regex = Regex::new(&pattern).unwrap(); + new_ucmd!() .env("POSIXLY_CORRECT", "1") .env("LC_ALL", "POSIX") - .args(&[test_file_path]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture(expected_test_file_path, &[("{last_modified_time}", &value)]); - - let mut scenario = new_ucmd!(); - let value = file_last_modified_time_format(&scenario, test_file_path, POSIXLY_FORMAT); - scenario + .stdout_matches(®ex); + new_ucmd!() .env("POSIXLY_CORRECT", "1") .env("LC_TIME", "POSIX") - .args(&[test_file_path]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture(expected_test_file_path, &[("{last_modified_time}", &value)]); + .stdout_matches(®ex); // But not if POSIXLY_CORRECT/LC_ALL is something else. - let mut scenario = new_ucmd!(); - let value = file_last_modified_time_format(&scenario, test_file_path, DATE_TIME_FORMAT_DEFAULT); - scenario + let whitespace = " ".repeat(50); + let datetime_pattern = r"\d\d\d\d-\d\d-\d\d \d\d:\d\d"; + let pattern = format!("\n\n{datetime_pattern}{whitespace}Page 1\n\n\na{blank_lines}"); + let regex = Regex::new(&pattern).unwrap(); + new_ucmd!() .env("LC_TIME", "POSIX") - .args(&[test_file_path]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture(expected_test_file_path, &[("{last_modified_time}", &value)]); - - let mut scenario = new_ucmd!(); - let value = file_last_modified_time_format(&scenario, test_file_path, DATE_TIME_FORMAT_DEFAULT); - scenario + .stdout_matches(®ex); + new_ucmd!() .env("POSIXLY_CORRECT", "1") .env("LC_TIME", "C") - .args(&[test_file_path]) + .pipe_in("a") .succeeds() - .stdout_is_templated_fixture(expected_test_file_path, &[("{last_modified_time}", &value)]); + .stdout_matches(®ex); } #[test] fn test_with_pr_core_utils_tests() { let test_cases = vec![ ("", vec!["0Ft"], vec!["0F"], 0), - ("", vec!["0Fnt"], vec!["0F"], 0), + ("", vec!["0Fnt"], vec!["0Fnt-expected"], 0), ("+3", vec!["0Ft"], vec!["3-0F"], 0), ("+3 -f", vec!["0Ft"], vec!["3f-0F"], 0), ("-a -3", vec!["0Ft"], vec!["a3-0F"], 0), ("-a -3 -f", vec!["0Ft"], vec!["a3f-0F"], 0), - ("-a -3 -f", vec!["0Fnt"], vec!["a3f-0F"], 0), + ("-a -3 -f", vec!["0Fnt"], vec!["a3f-0Fnt-expected"], 0), ("+3 -a -3 -f", vec!["0Ft"], vec!["3a3f-0F"], 0), ("-l 24", vec!["FnFn"], vec!["l24-FF"], 0), ("-W 20 -l24 -f", vec!["tFFt-ll"], vec!["W20l24f-ll"], 0), @@ -622,3 +617,13 @@ fn test_b_flag_backwards_compat() { // -b is a no-op for backwards compatibility (column-down is now the default) new_ucmd!().args(&["-b", "-t"]).pipe_in("a\nb\n").succeeds(); } + +#[test] +fn test_page_header_width() { + let whitespace = " ".repeat(50); + let blank_lines = "\n".repeat(61); + let datetime_pattern = r"\d\d\d\d-\d\d-\d\d \d\d:\d\d"; + let pattern = format!("\n\n{datetime_pattern}{whitespace}Page 1\n\n\na{blank_lines}"); + let regex = Regex::new(&pattern).unwrap(); + new_ucmd!().pipe_in("a").succeeds().stdout_matches(®ex); +} diff --git a/tests/by-util/test_touch.rs b/tests/by-util/test_touch.rs index eb2b5c02f6f..a53079d85e9 100644 --- a/tests/by-util/test_touch.rs +++ b/tests/by-util/test_touch.rs @@ -781,7 +781,8 @@ fn test_touch_system_fails() { fn test_touch_trailing_slash() { let file = "no-file/"; new_ucmd!().args(&[file]).fails().stderr_only(format!( - "touch: cannot touch '{file}': No such file or directory\n" + // This conforms with GNU coreutils 9.9 behavior. + "touch: setting times of '{file}': No such file or directory\n" )); } diff --git a/tests/fixtures/pr/0F b/tests/fixtures/pr/0F index 2237653915c..af35676eabc 100644 --- a/tests/fixtures/pr/0F +++ b/tests/fixtures/pr/0F @@ -1,6 +1,6 @@ -{last_modified_time} {file_name} Page 1 +{last_modified_time} {file_name} Page 1 @@ -66,7 +66,7 @@ -{last_modified_time} {file_name} Page 2 +{last_modified_time} {file_name} Page 2 1 FF-Test: FF's at Start of File V @@ -132,7 +132,7 @@ -{last_modified_time} {file_name} Page 3 +{last_modified_time} {file_name} Page 3 @@ -198,7 +198,7 @@ -{last_modified_time} {file_name} Page 4 +{last_modified_time} {file_name} Page 4 15 xyzxyzxyz XYZXYZXYZ abcabcab @@ -264,7 +264,7 @@ -{last_modified_time} {file_name} Page 5 +{last_modified_time} {file_name} Page 5 29 xyzxyzxyz XYZXYZXYZ abcabcab diff --git a/tests/fixtures/pr/0Fnt-expected b/tests/fixtures/pr/0Fnt-expected new file mode 100644 index 00000000000..ab2f28a0987 --- /dev/null +++ b/tests/fixtures/pr/0Fnt-expected @@ -0,0 +1,330 @@ + + +{last_modified_time} {file_name} Page 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 2 + + +1 FF-Test: FF's at Start of File V +2 Options -b -3 / -a -3 / ... +3 -------------------------------------------- +4 3456789 123456789 123456789 123456789 12345678 +5 3 Columns downwards ..., <= 5 lines per page +6 FF-Arangements: Empty Pages at start +7 \ftext; \f\ntext; +8 \f\ftext; \f\f\ntext; \f\n\ftext; \f\n\f\n; +9 3456789 123456789 123456789 +10 zzzzzzzzzzzzzzzzzzzzzzzzzz123456789 +1 12345678 +2 12345678 +3 line truncation before FF; r_r_o_l-test: +14 456789 123456789 123456789 123456789 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 4 + + +15 xyzxyzxyz XYZXYZXYZ abcabcab +16 456789 123456789 xyzxyzxyz XYZXYZXYZ +7 12345678 +8 12345678 +9 3456789 ab +20 DEFGHI 123 +1 12345678 +2 12345678 +3 12345678 +4 12345678 +5 12345678 +6 12345678 +27 no truncation before FF; (r_l-test): +28 no trunc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 5 + + +29 xyzxyzxyz XYZXYZXYZ abcabcab +30 456789 123456789 xyzxyzxyz XYZXYZXYZ +1 12345678 +2 3456789 abcdefghi +3 12345678 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fixtures/pr/3-0F b/tests/fixtures/pr/3-0F index 25a9db1719e..3a9f0b657c6 100644 --- a/tests/fixtures/pr/3-0F +++ b/tests/fixtures/pr/3-0F @@ -1,6 +1,6 @@ -{last_modified_time} {file_name} Page 3 +{last_modified_time} {file_name} Page 3 @@ -66,7 +66,7 @@ -{last_modified_time} {file_name} Page 4 +{last_modified_time} {file_name} Page 4 15 xyzxyzxyz XYZXYZXYZ abcabcab @@ -132,7 +132,7 @@ -{last_modified_time} {file_name} Page 5 +{last_modified_time} {file_name} Page 5 29 xyzxyzxyz XYZXYZXYZ abcabcab diff --git a/tests/fixtures/pr/3a3f-0F b/tests/fixtures/pr/3a3f-0F index 6097374c776..f19823acc0a 100644 --- a/tests/fixtures/pr/3a3f-0F +++ b/tests/fixtures/pr/3a3f-0F @@ -1,11 +1,11 @@ -{last_modified_time} {file_name} Page 3 +{last_modified_time} {file_name} Page 3 -{last_modified_time} {file_name} Page 4 +{last_modified_time} {file_name} Page 4 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 @@ -15,7 +15,7 @@ 27 no truncation before 28 no trunc -{last_modified_time} {file_name} Page 5 +{last_modified_time} {file_name} Page 5 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 diff --git a/tests/fixtures/pr/3f-0F b/tests/fixtures/pr/3f-0F index d32c1f8f653..92805024aa2 100644 --- a/tests/fixtures/pr/3f-0F +++ b/tests/fixtures/pr/3f-0F @@ -1,11 +1,11 @@ -{last_modified_time} {file_name} Page 3 +{last_modified_time} {file_name} Page 3 -{last_modified_time} {file_name} Page 4 +{last_modified_time} {file_name} Page 4 15 xyzxyzxyz XYZXYZXYZ abcabcab @@ -25,7 +25,7 @@ -{last_modified_time} {file_name} Page 5 +{last_modified_time} {file_name} Page 5 29 xyzxyzxyz XYZXYZXYZ abcabcab diff --git a/tests/fixtures/pr/a3-0F b/tests/fixtures/pr/a3-0F index 58aeb07c2e4..302ab52d109 100644 --- a/tests/fixtures/pr/a3-0F +++ b/tests/fixtures/pr/a3-0F @@ -1,6 +1,6 @@ -{last_modified_time} {file_name} Page 1 +{last_modified_time} {file_name} Page 1 @@ -66,7 +66,7 @@ -{last_modified_time} {file_name} Page 2 +{last_modified_time} {file_name} Page 2 1 FF-Test: FF's at St 2 Options -b -3 / -a 3 ------------------- @@ -132,7 +132,7 @@ -{last_modified_time} {file_name} Page 3 +{last_modified_time} {file_name} Page 3 @@ -198,7 +198,7 @@ -{last_modified_time} {file_name} Page 4 +{last_modified_time} {file_name} Page 4 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 @@ -264,7 +264,7 @@ -{last_modified_time} {file_name} Page 5 +{last_modified_time} {file_name} Page 5 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 diff --git a/tests/fixtures/pr/a3f-0F b/tests/fixtures/pr/a3f-0F index 24939c004b0..54e0e80b5ac 100644 --- a/tests/fixtures/pr/a3f-0F +++ b/tests/fixtures/pr/a3f-0F @@ -1,11 +1,11 @@ -{last_modified_time} {file_name} Page 1 +{last_modified_time} {file_name} Page 1 -{last_modified_time} {file_name} Page 2 +{last_modified_time} {file_name} Page 2 1 FF-Test: FF's at St 2 Options -b -3 / -a 3 ------------------- @@ -15,12 +15,12 @@ 3 line truncation befor 14 456789 123456789 123 -{last_modified_time} {file_name} Page 3 +{last_modified_time} {file_name} Page 3 -{last_modified_time} {file_name} Page 4 +{last_modified_time} {file_name} Page 4 15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 @@ -30,7 +30,7 @@ 27 no truncation before 28 no trunc -{last_modified_time} {file_name} Page 5 +{last_modified_time} {file_name} Page 5 29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 diff --git a/tests/fixtures/pr/a3f-0Fnt-expected b/tests/fixtures/pr/a3f-0Fnt-expected new file mode 100644 index 00000000000..14d51325b04 --- /dev/null +++ b/tests/fixtures/pr/a3f-0Fnt-expected @@ -0,0 +1,37 @@ + + +{last_modified_time} {file_name} Page 1 + + + + +{last_modified_time} {file_name} Page 2 + + +1 FF-Test: FF's at St 2 Options -b -3 / -a 3 ------------------- +4 3456789 123456789 123 5 3 Columns downwards 6 FF-Arangements: Emp +7 \ftext; \f\ntext; 8 \f\ftext; \f\f\ntex 9 3456789 123456789 123 +10 zzzzzzzzzzzzzzzzzzz 1 2 +3 line truncation befor 14 456789 123456789 123 + + +{last_modified_time} {file_name} Page 3 + + + + +{last_modified_time} {file_name} Page 4 + + +15 xyzxyzxyz XYZXYZXYZ 16 456789 123456789 xyz 7 +8 9 3456789 ab 20 DEFGHI 123 +1 2 3 +4 5 6 +27 no truncation before 28 no trunc + + +{last_modified_time} {file_name} Page 5 + + +29 xyzxyzxyz XYZXYZXYZ 30 456789 123456789 xyz 1 +2 3456789 abcdefghi 3 \ No newline at end of file diff --git a/tests/fixtures/pr/column.log.expected b/tests/fixtures/pr/column.log.expected index e548d41284f..6e817eced33 100644 --- a/tests/fixtures/pr/column.log.expected +++ b/tests/fixtures/pr/column.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} column.log Page 3 +{last_modified_time} column.log Page 3 337 337 393 393 449 449 @@ -66,7 +66,7 @@ -{last_modified_time} column.log Page 4 +{last_modified_time} column.log Page 4 505 505 561 561 617 617 @@ -132,7 +132,7 @@ -{last_modified_time} column.log Page 5 +{last_modified_time} column.log Page 5 673 673 729 729 785 785 diff --git a/tests/fixtures/pr/column_across.log.expected b/tests/fixtures/pr/column_across.log.expected index 9d5a1dc1ca4..4b0c93856b8 100644 --- a/tests/fixtures/pr/column_across.log.expected +++ b/tests/fixtures/pr/column_across.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} column.log Page 3 +{last_modified_time} column.log Page 3 337 337 338 338 339 339 @@ -66,7 +66,7 @@ -{last_modified_time} column.log Page 4 +{last_modified_time} column.log Page 4 505 505 506 506 507 507 @@ -132,7 +132,7 @@ -{last_modified_time} column.log Page 5 +{last_modified_time} column.log Page 5 673 673 674 674 675 675 diff --git a/tests/fixtures/pr/column_across_sep.log.expected b/tests/fixtures/pr/column_across_sep.log.expected index 65c3e71c8ff..aad7dff2750 100644 --- a/tests/fixtures/pr/column_across_sep.log.expected +++ b/tests/fixtures/pr/column_across_sep.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} column.log Page 3 +{last_modified_time} column.log Page 3 337 337 | 338 338 | 339 339 @@ -66,7 +66,7 @@ -{last_modified_time} column.log Page 4 +{last_modified_time} column.log Page 4 505 505 | 506 506 | 507 507 @@ -132,7 +132,7 @@ -{last_modified_time} column.log Page 5 +{last_modified_time} column.log Page 5 673 673 | 674 674 | 675 675 diff --git a/tests/fixtures/pr/column_across_sep1.log.expected b/tests/fixtures/pr/column_across_sep1.log.expected index f9dd454d708..e28885a4e35 100644 --- a/tests/fixtures/pr/column_across_sep1.log.expected +++ b/tests/fixtures/pr/column_across_sep1.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} column.log Page 3 +{last_modified_time} column.log Page 3 337 337 divide 338 338 divide 339 339 @@ -66,7 +66,7 @@ -{last_modified_time} column.log Page 4 +{last_modified_time} column.log Page 4 505 505 divide 506 506 divide 507 507 @@ -132,7 +132,7 @@ -{last_modified_time} column.log Page 5 +{last_modified_time} column.log Page 5 673 673 divide 674 674 divide 675 675 diff --git a/tests/fixtures/pr/column_spaces_across.log.expected b/tests/fixtures/pr/column_spaces_across.log.expected index 037dd814ba3..77303249bfc 100644 --- a/tests/fixtures/pr/column_spaces_across.log.expected +++ b/tests/fixtures/pr/column_spaces_across.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} column.log Page 3 +{last_modified_time} column.log Page 3 337 337 338 338 339 339 @@ -66,7 +66,7 @@ -{last_modified_time} column.log Page 4 +{last_modified_time} column.log Page 4 505 505 506 506 507 507 @@ -132,7 +132,7 @@ -{last_modified_time} column.log Page 5 +{last_modified_time} column.log Page 5 673 673 674 674 675 675 diff --git a/tests/fixtures/pr/joined.log.expected b/tests/fixtures/pr/joined.log.expected index a9cee6e4f4b..4176944a6f8 100644 --- a/tests/fixtures/pr/joined.log.expected +++ b/tests/fixtures/pr/joined.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} Page 1 +{last_modified_time} Page 1 ##ntation processAirPortStateChanges]: pppConnectionState 0 @@ -66,7 +66,7 @@ Mon Dec 10 11:42:59.352 Info: 802.1X changed -{last_modified_time} Page 2 +{last_modified_time} Page 2 Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/l24-FF b/tests/fixtures/pr/l24-FF index de219b2fb1f..2da241047cb 100644 --- a/tests/fixtures/pr/l24-FF +++ b/tests/fixtures/pr/l24-FF @@ -1,6 +1,6 @@ -{last_modified_time} {file_name} Page 1 +{last_modified_time} {file_name} Page 1 1 FF-Test: FF's in Text V @@ -24,7 +24,7 @@ -{last_modified_time} {file_name} Page 2 +{last_modified_time} {file_name} Page 2 @@ -48,7 +48,7 @@ -{last_modified_time} {file_name} Page 3 +{last_modified_time} {file_name} Page 3 @@ -72,7 +72,7 @@ -{last_modified_time} {file_name} Page 4 +{last_modified_time} {file_name} Page 4 15 xyzxyzxyz XYZXYZXYZ abcabcab @@ -96,7 +96,7 @@ -{last_modified_time} {file_name} Page 5 +{last_modified_time} {file_name} Page 5 @@ -120,7 +120,7 @@ -{last_modified_time} {file_name} Page 6 +{last_modified_time} {file_name} Page 6 @@ -144,7 +144,7 @@ -{last_modified_time} {file_name} Page 7 +{last_modified_time} {file_name} Page 7 29 xyzxyzxyz XYZXYZXYZ abcabcab @@ -168,7 +168,7 @@ -{last_modified_time} {file_name} Page 8 +{last_modified_time} {file_name} Page 8 @@ -192,7 +192,7 @@ -{last_modified_time} {file_name} Page 9 +{last_modified_time} {file_name} Page 9 @@ -216,7 +216,7 @@ -{last_modified_time} {file_name} Page 10 +{last_modified_time} {file_name} Page 10 @@ -240,7 +240,7 @@ -{last_modified_time} {file_name} Page 11 +{last_modified_time} {file_name} Page 11 43 xyzxyzxyz XYZXYZXYZ abcabcab @@ -264,7 +264,7 @@ -{last_modified_time} {file_name} Page 12 +{last_modified_time} {file_name} Page 12 @@ -288,7 +288,7 @@ -{last_modified_time} {file_name} Page 13 +{last_modified_time} {file_name} Page 13 57 xyzxyzxyz XYZXYZXYZ abcabcab diff --git a/tests/fixtures/pr/mpr.log.expected b/tests/fixtures/pr/mpr.log.expected index f6fffd19141..0f4d276b108 100644 --- a/tests/fixtures/pr/mpr.log.expected +++ b/tests/fixtures/pr/mpr.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} Page 1 +{last_modified_time} Page 1 1 1 ## @@ -66,7 +66,7 @@ -{last_modified_time} Page 2 +{last_modified_time} Page 2 57 57 diff --git a/tests/fixtures/pr/mpr1.log.expected b/tests/fixtures/pr/mpr1.log.expected index 64d786d90ad..1d691599878 100644 --- a/tests/fixtures/pr/mpr1.log.expected +++ b/tests/fixtures/pr/mpr1.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} Page 2 +{last_modified_time} Page 2 57 57 @@ -66,7 +66,7 @@ -{last_modified_time} Page 3 +{last_modified_time} Page 3 113 113 @@ -132,7 +132,7 @@ -{last_modified_time} Page 4 +{last_modified_time} Page 4 169 169 diff --git a/tests/fixtures/pr/mpr2.log.expected b/tests/fixtures/pr/mpr2.log.expected index 091f0f2280f..9c453924ccc 100644 --- a/tests/fixtures/pr/mpr2.log.expected +++ b/tests/fixtures/pr/mpr2.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} Page 1 +{last_modified_time} Page 1 1 1 ## 1 @@ -100,7 +100,7 @@ -{last_modified_time} Page 2 +{last_modified_time} Page 2 91 91 91 diff --git a/tests/fixtures/pr/stdin.log.expected b/tests/fixtures/pr/stdin.log.expected index 6922ee59454..5f9d6c23535 100644 --- a/tests/fixtures/pr/stdin.log.expected +++ b/tests/fixtures/pr/stdin.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} Page 1 +{last_modified_time} Page 1 1 ntation processAirPortStateChanges]: pppConnectionState 0 @@ -66,7 +66,7 @@ -{last_modified_time} Page 2 +{last_modified_time} Page 2 57 Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/test_num_page_2.log.expected b/tests/fixtures/pr/test_num_page_2.log.expected index dae437ef867..bf9a6c174fd 100644 --- a/tests/fixtures/pr/test_num_page_2.log.expected +++ b/tests/fixtures/pr/test_num_page_2.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test_num_page.log Page 1 +{last_modified_time} test_num_page.log Page 1 1 ntation processAirPortStateChanges]: pppConnectionState 0 @@ -66,7 +66,7 @@ -{last_modified_time} test_num_page.log Page 2 +{last_modified_time} test_num_page.log Page 2 57 ntation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/test_num_page_char.log.expected b/tests/fixtures/pr/test_num_page_char.log.expected index 169dbd844d2..0536b75c0d8 100644 --- a/tests/fixtures/pr/test_num_page_char.log.expected +++ b/tests/fixtures/pr/test_num_page_char.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test_num_page.log Page 1 +{last_modified_time} test_num_page.log Page 1 1cntation processAirPortStateChanges]: pppConnectionState 0 @@ -66,7 +66,7 @@ -{last_modified_time} test_num_page.log Page 2 +{last_modified_time} test_num_page.log Page 2 57cntation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/test_num_page_char_one.log.expected b/tests/fixtures/pr/test_num_page_char_one.log.expected index dd78131921e..cd0b1278115 100644 --- a/tests/fixtures/pr/test_num_page_char_one.log.expected +++ b/tests/fixtures/pr/test_num_page_char_one.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test_num_page.log Page 1 +{last_modified_time} test_num_page.log Page 1 1cntation processAirPortStateChanges]: pppConnectionState 0 @@ -66,7 +66,7 @@ -{last_modified_time} test_num_page.log Page 2 +{last_modified_time} test_num_page.log Page 2 7cntation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/test_one_page.log.expected b/tests/fixtures/pr/test_one_page.log.expected index 54f7723924f..fc354b41d84 100644 --- a/tests/fixtures/pr/test_one_page.log.expected +++ b/tests/fixtures/pr/test_one_page.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test_one_page.log Page 1 +{last_modified_time} test_one_page.log Page 1 ntation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/test_one_page_double_line.log.expected b/tests/fixtures/pr/test_one_page_double_line.log.expected index e32101fcf5d..49ed90c8752 100644 --- a/tests/fixtures/pr/test_one_page_double_line.log.expected +++ b/tests/fixtures/pr/test_one_page_double_line.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test_one_page.log Page 1 +{last_modified_time} test_one_page.log Page 1 ntation processAirPortStateChanges]: pppConnectionState 0 @@ -66,7 +66,7 @@ Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementati -{last_modified_time} test_one_page.log Page 2 +{last_modified_time} test_one_page.log Page 2 Mon Dec 10 11:42:57.896 Info: 802.1X changed diff --git a/tests/fixtures/pr/test_one_page_first_line.log.expected b/tests/fixtures/pr/test_one_page_first_line.log.expected index 303f01c732b..5c7b2eebe66 100644 --- a/tests/fixtures/pr/test_one_page_first_line.log.expected +++ b/tests/fixtures/pr/test_one_page_first_line.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test_one_page.log Page 1 +{last_modified_time} test_one_page.log Page 1 5 ntation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/test_one_page_header.log.expected b/tests/fixtures/pr/test_one_page_header.log.expected index a00d5f85505..06a69088c25 100644 --- a/tests/fixtures/pr/test_one_page_header.log.expected +++ b/tests/fixtures/pr/test_one_page_header.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} {header} Page 1 +{last_modified_time} {header} Page 1 ntation processAirPortStateChanges]: pppConnectionState 0 diff --git a/tests/fixtures/pr/test_page_length.log.expected b/tests/fixtures/pr/test_page_length.log.expected index 8f4ab82d1cd..38578c1dcaa 100644 --- a/tests/fixtures/pr/test_page_length.log.expected +++ b/tests/fixtures/pr/test_page_length.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test.log Page 2 +{last_modified_time} test.log Page 2 91 Mon Dec 10 11:43:31.748 )} took 0.0025 seconds, returned 10 results @@ -100,7 +100,7 @@ -{last_modified_time} test.log Page 3 +{last_modified_time} test.log Page 3 181 Mon Dec 10 11:52:32.715 AutoJoin: Successful cache-assisted scan request for locationd with channels {( diff --git a/tests/fixtures/pr/test_page_range_1.log.expected b/tests/fixtures/pr/test_page_range_1.log.expected index f254261d4bc..fa35f844509 100644 --- a/tests/fixtures/pr/test_page_range_1.log.expected +++ b/tests/fixtures/pr/test_page_range_1.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test.log Page 15 +{last_modified_time} test.log Page 15 Mon Dec 10 12:05:48.183 [channelNumber=12(2GHz), channelWidth={20MHz}, active] @@ -66,7 +66,7 @@ Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE -{last_modified_time} test.log Page 16 +{last_modified_time} test.log Page 16 Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/ProfileID' @@ -132,7 +132,7 @@ Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: -{last_modified_time} test.log Page 17 +{last_modified_time} test.log Page 17 Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change @@ -198,7 +198,7 @@ Mon Dec 10 12:13:27.640 Info: link quality changed -{last_modified_time} test.log Page 18 +{last_modified_time} test.log Page 18 Mon Dec 10 12:14:46.658 Info: SCAN request received from pid 92 (locationd) with priority 2 diff --git a/tests/fixtures/pr/test_page_range_2.log.expected b/tests/fixtures/pr/test_page_range_2.log.expected index 4f260eb6544..2ca5ed04dca 100644 --- a/tests/fixtures/pr/test_page_range_2.log.expected +++ b/tests/fixtures/pr/test_page_range_2.log.expected @@ -1,6 +1,6 @@ -{last_modified_time} test.log Page 15 +{last_modified_time} test.log Page 15 Mon Dec 10 12:05:48.183 [channelNumber=12(2GHz), channelWidth={20MHz}, active] @@ -66,7 +66,7 @@ Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE -{last_modified_time} test.log Page 16 +{last_modified_time} test.log Page 16 Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/ProfileID' @@ -132,7 +132,7 @@ Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: -{last_modified_time} test.log Page 17 +{last_modified_time} test.log Page 17 Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 2ae6b1e6186..421b43d5e7e 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -320,11 +320,9 @@ echo "n_stat1 = \$n_stat1"\n\ echo "n_stat2 = \$n_stat2"\n\ test \$n_stat1 -ge \$n_stat2 \\' tests/ls/stat-free-color.sh -# no need to replicate this output with hashsum +# clap changes the error message. Check exit code only. "${SED}" -i -e "s|Try 'md5sum --help' for more information.\\\n||" tests/cksum/md5sum.pl -# clap changes the error message - "${SED}" -i '/check-ignore-missing-4/,/EXIT=> 1/ { /ERR=>/,/try_help/d }' tests/cksum/md5sum.pl - +"${SED}" -i '/check-ignore-missing-4/,/EXIT/c \ ['\''check-ignore-missing-4'\'', '\''--ignore-missing'\'', {IN=> {f=> '\'''\''}}, {ERR_SUBST=>"s/.*//s"}, {EXIT=> 1}],' tests/cksum/md5sum.pl # Our ls command always outputs ANSI color codes prepended with a zero. However, # in the case of GNU, it seems inconsistent. Nevertheless, it looks like it # doesn't matter whether we prepend a zero or not.