diff --git a/.codespell.rc b/.codespell.rc new file mode 100644 index 000000000..914ca2951 --- /dev/null +++ b/.codespell.rc @@ -0,0 +1,3 @@ +[codespell] +ignore-words-list = crate +skip = ./.git/**,./.vscode/cspell.dictionaries/**,./target/**,./tests/fixtures/** diff --git a/.editorconfig b/.editorconfig index 95dfec676..d93fa7c0e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,22 +3,38 @@ # * top-most EditorConfig file root = true -# Unix-style newlines with a newline ending every file [*] +# default ~ utf-8, unix-style newlines with a newline ending every file, 4 space indentation charset = utf-8 end_of_line = lf indent_size = 4 indent_style = space insert_final_newline = true +max_line_length = 100 trim_trailing_whitespace = true -[*.{bat,cmd,[Bb][Aa][Tt],[Cc][Mm][Dd]}] -# DOS/Win requires BAT/CMD files to have CRLF EOLNs -end_of_line = crlf - -[[Mm]akefile{,.*}] -# TAB-style indentation +[[Mm]akefile{,.*}, *.{mk,[Mm][Kk]}] +# makefiles ~ TAB-style indentation indent_style = tab -[*.{yml,[Yy][Mm][Ll]}] +[*.{bat,cmd,[Bb][Aa][Tt],[Cc][Mm][Dd]}] +# BAT/CMD ~ DOS/Win requires BAT/CMD files to have CRLF EOLNs +end_of_line = crlf + +[*.go] +# go ~ TAB-style indentation (SPACE-style alignment); ref: @@ +indent_style = tab + +[*.{cjs,js,json,mjs,ts}] +# js/ts indent_size = 2 + +[*.{markdown,md,mkd,[Mm][Dd],[Mm][Kk][Dd],[Mm][Dd][Oo][Ww][Nn],[Mm][Kk][Dd][Oo][Ww][Nn],[Mm][Aa][Rr][Kk][Dd][Oo][Ww][Nn]}] +# markdown +indent_size = 2 +indent_style = space + +[*.{yaml,yml,[Yy][Mm][Ll],[Yy][Aa][Mm][Ll]}] +# YAML +indent_size = 2 +indent_style = space diff --git a/.github/stale.yml b/.github/stale.yml index e0988d0bd..b614226dc 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,4 +1,5 @@ -# Number of days of inactivity before an issue/PR becomes stale +# spell-checker:ignore (labels) wontfix + # Number of days of inactivity before an issue/PR becomes stale daysUntilStale: 365 # Number of days of inactivity before a stale issue/PR is closed daysUntilClose: 365 diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 5ac9295d4..32c3537c2 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -5,7 +5,7 @@ name: CICD # spell-checker:ignore (jargon) SHAs deps softprops toolchain # spell-checker:ignore (names) CodeCOV MacOS MinGW Peltoche rivy # spell-checker:ignore (shell/tools) choco clippy dmake dpkg esac fakeroot gmake grcov halium lcov libssl mkdir popd printf pushd rustc rustfmt rustup shopt xargs -# spell-checker:ignore (misc) aarch alnum armhf coreutils gnueabihf issuecomment maint nullglob onexitbegin onexitend tempfile uutils +# spell-checker:ignore (misc) aarch alnum armhf bindir busytest coreutils gnueabihf issuecomment maint nullglob onexitbegin onexitend tempfile testsuite uutils env: PROJECT_NAME: coreutils @@ -58,6 +58,24 @@ jobs: # * convert any warnings to GHA UI annotations; ref: S=$(find tests -name "*.rs" -print0 | xargs -0 cargo fmt -- --check) && printf "%s\n" "$S" || { printf "%s\n" "$S" | sed -E -n "s/^Diff[[:space:]]+in[[:space:]]+${PWD//\//\\/}\/(.*)[[:space:]]+at[[:space:]]+[^0-9]+([0-9]+).*$/::warning file=\1,line=\2::WARNING: \`cargo fmt\`: style violation/p" ; } + code_spellcheck: + name: Style/spelling + runs-on: ${{ matrix.job.os }} + strategy: + matrix: + job: + - { os: ubuntu-latest } + steps: + - uses: actions/checkout@v1 + - name: Install/setup prerequisites + shell: bash + run: | + sudo apt-get -y update ; sudo apt-get -y install npm ; sudo npm install cspell -g; + - name: Run `cspell` + shell: bash + run: | + cspell --config .vscode/cSpell.json --no-summary --no-progress "**/*" | sed "s/\(.*\):\(.*\):\(.*\) - \(.*\)/::warning file=\1,line=\2,col=\3::cspell: \4/" || true + code_warnings: name: Style/warnings runs-on: ${{ matrix.job.os }} @@ -614,20 +632,3 @@ jobs: flags: ${{ steps.vars.outputs.CODECOV_FLAGS }} name: codecov-umbrella fail_ci_if_error: false - spellcheck: - name: Spell Check - runs-on: ${{ matrix.job.os }} - strategy: - matrix: - job: - - { os: ubuntu-latest } - steps: - - uses: actions/checkout@v1 - - name: Install/setup prerequisites - shell: bash - run: | - sudo apt-get -y update ; sudo apt-get -y install npm ; sudo npm install cspell -g; - - name: Run `cspell` - shell: bash - run: | - cspell --config .vscode/cSpell.json --no-summary --no-progress $( git ls-files | grep "\.\(rs\|md\)" ) | sed "s/\(.*\):\(.*\):\(.*\) - \(.*\)/::warning file=\1,line=\2,col=\3::cspell: \4/" || true diff --git a/.vscode/cSpell.json b/.vscode/cSpell.json index 8561d69ad..9869923a4 100644 --- a/.vscode/cSpell.json +++ b/.vscode/cSpell.json @@ -1,352 +1,19 @@ // `cspell` settings { - "version": "0.1", // Version of the setting file. Always 0.1 - "language": "en", // language - current active spelling language - // ignoreWords - "ignoreWords": [ - // abbrev/acronyms - "Cygwin", - "FreeBSD", - "Gmail", - "GNUEABI", - "GNUEABIhf", - "Irix", - "MacOS", - "MinGW", - "Minix", - "MS-DOS", - "MSDOS", - "NetBSD", - "Novell", - "OpenBSD", - "POSIX", - "SELinux", - "Solaris", - "Xenix", - "flac", - "lzma", - // cargo - "cdylib", - "rlib", - // crates - "advapi", - "advapi32-sys", - "aho-corasick", - "backtrace", - "byteorder", - "chacha", - "chrono", - "conv", - "corasick", - "filetime", - "formatteriteminfo", - "getopts", - "itertools", - "memchr", - "multifilereader", - "onig", - "peekreader", - "quickcheck", - "rand_chacha", - "smallvec", - "tempfile", - "termion", - "termios", - "termsize", - "termwidth", - "textwrap", - "walkdir", - "winapi", - "xattr", - // jargon - "AST", // abstract syntax tree - "CPU", - "CPUs", - "FIFO", - "FIFOs", - "FQDN", // fully qualified domain name - "GID", // group ID - "GIDs", - "POSIXLY", - "RNG", // random number generator - "RNGs", - "UID", // user ID - "UIDs", - "UUID", // universally unique identifier - "arity", - "bitmask", - "canonicalization", - "canonicalize", - "colorizable", - "colorize", - "consts", - "dedup", - "demangle", - "deque", - "dequeue", - "enqueue", - "executable", - "executables", - "gibibytes", - "hardfloat", - "hardlink", - "hardlinks", - "hashsums", - "kibibytes", - "mebibytes", - "mergeable", - "multibyte", - "nonportable", - "peekable", - "precompiled", - "precompute", - "preload", - "prepend", - "prepended", - "primality", - "pseudoprime", - "pseudoprimes", - "procs", - "readonly", - "seedable", - "semver", - "shortcode", - "shortcodes", - "symlink", - "symlinks", - "syscall", - "toekenize", - "unbuffered", - "unportable", - "whitespace", - // names - "Akira Hayakawa", "Akira", "Hayakawa", - "Alan Andrade", "Alan", "Andrade", - "Alex Lyon", "Alex", "Lyon", - "Alexander Batischev", "Alexander", "Batischev", - "Aleksander Bielawski", "Aleksander", "Bielawski", - "Alexander Fomin", "Alexander", "Fomin", - "Anthony Deschamps", "Anthony", "Deschamps", - "Ben Eills", "Ben", "Eills", - "Ben Hirsch", "Ben", "Hirsch", - "Benoit Benedetti", "Benoit", "Benedetti", - "Boden Garman", "Boden", "Garman", - "Chirag B Jadwani", "Chirag", "Jadwani", - "Derek Chiang", "Derek", "Chiang", - "Dorota Kapturkiewicz", "Dorota", "Kapturkiewicz", - "Evgeniy Klyuchikov", "Evgeniy", "Klyuchikov", - "Fangxu Hu", "Fangxu", "Hu", - "Gil Cottle", "Gil", "Cottle", - "Haitao Li", "Haitao", "Li", - "Inokentiy Babushkin", "Inokentiy", "Babushkin", - "Joao Oliveira", "Joao", "Oliveira", - "Jeremiah Peschka", "Jeremiah", "Peschka", - "Jian Zeng", "Jian", "Zeng", - "Jimmy Lu", "Jimmy", "Lu", - "Jordi Boggiano", "Jordi", "Boggiano", - "Jordy Dickinson", "Jordy", "Dickinson", - "Joseph Crail", "Joseph", "Crail", - "Joshua S Miller", "Joshua", "Miller", - "KokaKiwi", - "Konstantin Pospelov", "Konstantin", "Pospelov", - "Mahkoh", - "Maciej Dziardziel", "Maciej", "Dziardziel", - "Michael Gehring", "Michael", "Gehring", - "Martin Kysel", "Martin", "Kysel", - "Morten Olsen Lysgaard", "Morten", "Olsen", "Lysgaard", - "Nicholas Juszczak", "Nicholas", "Juszczak", - "Nick Platt", "Nick", "Platt", - "Orvar Segerström", "Orvar", "Segerström", - "Peter Atashian", "Peter", "Atashian", - "Rolf Morel", "Rolf", "Morel", - "Roman Gafiyatullin", "Roman", "Gafiyatullin", - "Roy Ivy III", "Roy", "Ivy", "III", - "Sergey 'Shnatsel' Davidoff", "Sergey", "Shnatsel", "Davidoff", - "Sokovikov Evgeniy", "Sokovikov", "Evgeniy", - "Sunrin SHIMURA", "Sunrin", "SHIMURA", - "Smigle00", "Smigle", - "Sylvestre Ledru", "Sylvestre", "Ledru", - "T Jameson Little", "Jameson", "Little", - "Tobias Bohumir Schottdorf", "Tobias", "Bohumir", "Schottdorf", - "Virgile Andreani", "Virgile", "Andreani", - "Vsevolod Velichko", "Vsevolod", "Velichko", - "Wiktor Kuropatwa", "Wiktor", "Kuropatwa", - "Yury Krivopalov", "Yury", "Krivopalov", - "anonymousknight", - "kwantam", - "nicoo", - "rivy", - // rust - "clippy", - "concat", - "fract", - "powi", - "println", - "repr", - "rfind", - "rustc", - "rustfmt", - "struct", - "structs", - "substr", - "splitn", - "trunc", - // shell - "passwd", - "pipefail", - "tcsh", - // tags - "Maint", - // uutils - "chcon", - "chgrp", - "chmod", - "chown", - "chroot", - "cksum", - "csplit", - "dircolors", - "hashsum", - "hostid", - "logname", - "mkdir", - "mkfifo", - "mknod", - "mktemp", - "nohup", - "nproc", - "numfmt", - "pathchk", - "printenv", - "printf", - "readlink", - "realpath", - "relpath", - "rmdir", - "runcon", - "shuf", - "stdbuf", - "stty", - "tsort", - "uname", - "unexpand", - "whoami", - // vars/errno - "errno", - "EOPNOTSUPP", - // vars/fcntl - "F_GETFL", - "GETFL", - "fcntl", - "vmsplice", - // vars/libc - "FILENO", - "HOSTSIZE", - "IDSIZE", - "IFIFO", - "IFREG", - "IRGRP", - "IROTH", - "IRUSR", - "ISGID", - "ISUID", - "ISVTX", - "IWGRP", - "IWOTH", - "IWUSR", - "IXGRP", - "IXOTH", - "IXUSR", - "LINESIZE", - "NAMESIZE", - "USERSIZE", - "addrinfo", - "addrlen", - "canonname", - "chroot", - "freeaddrinfo", - "getaddrinfo", - "getegid", - "geteuid", - "getgid", - "getgrgid", - "getgrnam", - "getgrouplist", - "getgroups", - "getpwnam", - "getpwuid", - "getuid", - "inode", - "isatty", - "lchown", - "setgid", - "setgroups", - "setuid", - "socktype", - "umask", - "waitpid", - // vars/nix - "iovec", - "unistd", - // vars/signals - "SIGPIPE", - // vars/sync - "Condvar", - // vars/stat - "fstat", - "stat", - // vars/time - "Timespec", - "nsec", - "nsecs", - "strftime", - "usec", - "usecs", - // vars/utmpx - "endutxent", - "getutxent", - "getutxid", - "getutxline", - "pututxline", - "setutxent", - "utmp", - "utmpx", - "utmpxname", - // vars/winapi - "errhandlingapi", - "fileapi", - "handleapi", - "lmcons", - "minwindef", - "processthreadsapi", - "synchapi", - "sysinfoapi", - "winbase", - "winerror", - "winnt", - "winsock", - "DWORD", - "LPWSTR", - "WCHAR", - // uucore - "optflag", - "optflagmulti", - "optflagopt", - "optmulti", - "optopt", - // uutils - "coreopts", - "coreutils", - "libc", - "libstdbuf", - "musl", - "ucmd", - "utmpx", - "uucore", - "uucore_procs", - "uumain", - "uutils" - ], - // words - list of words to be always considered correct - "words": [] + "version": "0.1", // Version of the setting file. Always 0.1 + "language": "en", // language - current active spelling language + "dictionaries": ["acronyms+names", "jargon", "people", "shell", "workspace"], + "dictionaryDefinitions": [ + { "name": "acronyms+names", "path": "./cspell.dictionaries/acronyms+names.wordlist.txt" }, + { "name": "jargon", "path": "./cspell.dictionaries/jargon.wordlist.txt" }, + { "name": "people", "path": "./cspell.dictionaries/people.wordlist.txt" }, + { "name": "shell", "path": "./cspell.dictionaries/shell.wordlist.txt" }, + { "name": "workspace", "path": "./cspell.dictionaries/workspace.wordlist.txt" } + ], + // ignorePaths - a list of globs to specify which files are to be ignored + "ignorePaths": ["Cargo.lock", "target/**", "tests/**/fixtures/**"], + // ignoreWords - a list of words to be ignored (even if they are in the flagWords) + "ignoreWords": [], + // words - list of words to be always considered correct + "words": [] } diff --git a/.vscode/cspell.dictionaries/acronyms+names.wordlist.txt b/.vscode/cspell.dictionaries/acronyms+names.wordlist.txt new file mode 100644 index 000000000..3956d1d8a --- /dev/null +++ b/.vscode/cspell.dictionaries/acronyms+names.wordlist.txt @@ -0,0 +1,64 @@ +# * abbreviations / acronyms +AIX +ASLR # address space layout randomization +AST # abstract syntax tree +CICD # continuous integration/deployment +CPU +CPUs +DevOps +Ext3 +FIFO +FIFOs +FQDN # fully qualified domain name +GID # group ID +GIDs +GNUEABI +GNUEABIhf +JFS +MSRV # minimum supported rust version +MSVC +NixOS +POSIX +POSIXLY +RISC +RISCV +RNG # random number generator +RNGs +ReiserFS +Solaris +UID # user ID +UIDs +UUID # universally unique identifier +WASI +WASM +XFS +aarch +flac +lzma + +# * names +BusyBox +BusyTest +Codacy +Cygwin +Deno +EditorConfig +FreeBSD +Gmail +Irix +MS-DOS +MSDOS +MacOS +MinGW +Minix +NetBSD +Novell +OpenBSD +POSIX +PowerPC +SELinux +SkyPack +Solaris +SysV +Xenix +Yargs diff --git a/.vscode/cspell.dictionaries/jargon.wordlist.txt b/.vscode/cspell.dictionaries/jargon.wordlist.txt new file mode 100644 index 000000000..89af1b153 --- /dev/null +++ b/.vscode/cspell.dictionaries/jargon.wordlist.txt @@ -0,0 +1,110 @@ +arity +autogenerate +autogenerated +autogenerates +bitmask +bitwise +bytewise +canonicalization +canonicalize +canonicalizing +colorizable +colorize +coprime +consts +cyclomatic +dedup +deduplication +demangle +denoland +deque +dequeue +dev +devs +discoverability +duplicative +enqueue +errored +executable +executables +exponentiate +eval +falsey +flamegraph +gibibytes +glob +globbing +hardfloat +hardlink +hardlinks +hasher +hashsums +kibi +kibibytes +mebi +mebibytes +mergeable +microbenchmark +microbenchmarks +microbenchmarking +multibyte +multicall +nonportable +nonprinting +peekable +performant +precompiled +precompute +preload +prepend +prepended +primality +pseudoprime +pseudoprimes +quantiles +readonly +reparse +seedable +semver +semiprime +semiprimes +shortcode +shortcodes +subcommand +subexpression +submodule +symlink +symlinks +syscall +syscalls +tokenize +truthy +unbuffered +unescape +unintuitive +unprefixed +unportable +unsync +whitespace +wordlist +wordlists + +# * abbreviations +consts +deps +dev +maint +proc +procs + +# * constants +xffff + +# * variables +delim +errno +progname +retval +subdir +val +vals diff --git a/.vscode/cspell.dictionaries/people.wordlist.txt b/.vscode/cspell.dictionaries/people.wordlist.txt new file mode 100644 index 000000000..01cfa4a3e --- /dev/null +++ b/.vscode/cspell.dictionaries/people.wordlist.txt @@ -0,0 +1,171 @@ +Akira Hayakawa + Akira + Hayakawa +Alan Andrade + Alan + Andrade +Aleksander Bielawski + Aleksander + Bielawski +Alex Lyon + Alex + Lyon +Alexander Batischev + Alexander + Batischev +Alexander Fomin + Alexander + Fomin +Anthony Deschamps + Anthony + Deschamps +Árni Dagur + Árni + Dagur +Ben Eills + Ben + Eills +Ben Hirsch + Ben + Hirsch +Benoit Benedetti + Benoit + Benedetti +Boden Garman + Boden + Garman +Chirag B Jadwani + Chirag + Jadwani +Derek Chiang + Derek + Chiang +Dorota Kapturkiewicz + Dorota + Kapturkiewicz +Evgeniy Klyuchikov + Evgeniy + Klyuchikov +Fangxu Hu + Fangxu + Hu +Gil Cottle + Gil + Cottle +Haitao Li + Haitao + Li +Inokentiy Babushkin + Inokentiy + Babushkin +Jeremiah Peschka + Jeremiah + Peschka +Jian Zeng + Jian + Zeng +Jimmy Lu + Jimmy + Lu +Joao Oliveira + Joao + Oliveira +Jordi Boggiano + Jordi + Boggiano +Jordy Dickinson + Jordy + Dickinson +Joseph Crail + Joseph + Crail +Joshua S Miller + Joshua + Miller +Konstantin Pospelov + Konstantin + Pospelov +Maciej Dziardziel + Maciej + Dziardziel +Martin Kysel + Martin + Kysel +Michael Debertol + Michael + Debertol +Michael Gehring + Michael + Gehring +Morten Olsen Lysgaard + Morten + Olsen + Lysgaard +Nicholas Juszczak + Nicholas + Juszczak +Nick Platt + Nick + Platt +Orvar Segerström + Orvar + Segerström +Peter Atashian + Peter + Atashian +Robert Swinford + Robert + Swinford +Rolf Morel + Rolf + Morel +Roman Gafiyatullin + Roman + Gafiyatullin +Roy Ivy III * rivy + Roy + Ivy + III + rivy +Sergey "Shnatsel" Davidoff + Sergey Shnatsel Davidoff + Sergey + Shnatsel + Davidoff +Sokovikov Evgeniy + Sokovikov + Evgeniy +Sunrin SHIMURA + Sunrin + SHIMURA +Sylvestre Ledru + Sylvestre + Ledru +T Jameson Little + Jameson + Little +Tobias Bohumir Schottdorf + Tobias + Bohumir + Schottdorf +Virgile Andreani + Virgile + Andreani +Vsevolod Velichko + Vsevolod + Velichko +Wiktor Kuropatwa + Wiktor + Kuropatwa +Yury Krivopalov + Yury + Krivopalov + +KokaKiwi +Mahkoh +Smigle00 + Smigle00 + Smigle +anonymousknight +kwantam +nicoo diff --git a/.vscode/cspell.dictionaries/shell.wordlist.txt b/.vscode/cspell.dictionaries/shell.wordlist.txt new file mode 100644 index 000000000..d8f297d21 --- /dev/null +++ b/.vscode/cspell.dictionaries/shell.wordlist.txt @@ -0,0 +1,93 @@ +# * Mac +clonefile + +# * POSIX +TMPDIR +adduser +csh +globstar +inotify +localtime +mountinfo +mountpoint +mtab +nullglob +passwd +pipefail +popd +ptmx +pushd +setarch +sh +sudo +sudoedit +tcsh +tzselect +urandom +wtmp +zsh + +# * Windows +APPDATA +COMSPEC +HKCU +HKLM +HOMEDRIVE +HOMEPATH +LOCALAPPDATA +PATHEXT +PATHEXT +SYSTEMROOT +USERDOMAIN +USERNAME +USERPROFILE +procmon + +# * `git` +gitattributes +gitignore + +# * `make` (`gmake`) +CURDIR +GNUMAKEFLAGS +GNUMakefile +LIBPATTERNS +MAKECMDGOALS +MAKEFILES +MAKEFLAGS +MAKELEVEL +MAKESHELL +SHELLSTATUS +VPATH +abspath +addprefix +addsuffix +endef +firstword +ifeq +ifneq +lastword +notdir +patsubst + + +# * `npm` +preversion + +# * utilities +cachegrind +chglog +codespell +commitlint +dprint +dtrace +gcov +gmake +grcov +grep +markdownlint +rerast +rollup +sed +wslpath +xargs diff --git a/.vscode/cspell.dictionaries/workspace.wordlist.txt b/.vscode/cspell.dictionaries/workspace.wordlist.txt new file mode 100644 index 000000000..b567a6c21 --- /dev/null +++ b/.vscode/cspell.dictionaries/workspace.wordlist.txt @@ -0,0 +1,295 @@ +# * cargo +cdylib +rlib + +# * crates +advapi +advapi32-sys +aho-corasick +backtrace +bstr +byteorder +chacha +chrono +conv +corasick +crossterm +filetime +formatteriteminfo +fsext +getopts +getrandom +globset +itertools +lscolors +memchr +multifilereader +onig +ouroboros +peekreader +quickcheck +rand_chacha +ringbuffer +smallvec +tempdir +tempfile +termion +termios +termsize +termwidth +textwrap +thiserror +walkdir +winapi +xattr + +# * rust/rustc +RUSTDOCFLAGS +RUSTFLAGS +bitxor # BitXor trait function +clippy +concat +fract +powi +println +repr +rfind +rustc +rustfmt +struct +structs +substr +splitn +trunc + +# * uutils +chcon +chgrp +chmod +chown +chroot +cksum +csplit +dircolors +hashsum +hostid +logname +mkdir +mkfifo +mknod +mktemp +nohup +nproc +numfmt +pathchk +printenv +printf +readlink +realpath +relpath +rmdir +runcon +shuf +sprintf +stdbuf +stty +tsort +uname +unexpand +whoami + +# * vars/errno +errno +EEXIST +ENOENT +ENOSYS +EPERM +EOPNOTSUPP + +# * vars/fcntl +F_GETFL + GETFL +fcntl +vmsplice + +# * vars/libc +FILENO +HOSTSIZE +IDSIZE +IFBLK +IFCHR +IFDIR +IFIFO +IFLNK +IFMT +IFREG +IFSOCK +IRGRP +IROTH +IRUSR +ISGID +ISUID +ISVTX +IWGRP +IWOTH +IWUSR +IXGRP +IXOTH +IXUSR +LINESIZE +NAMESIZE +RTLD_NEXT + RTLD +SIGINT +SIGKILL +SIGTERM +SYS_fdatasync +SYS_syncfs +USERSIZE +addrinfo +addrlen +blocksize +canonname +chroot +dlsym +fdatasync +freeaddrinfo +getaddrinfo +getegid +geteuid +getgid +getgrgid +getgrnam +getgrouplist +getgroups +getpwnam +getpwuid +getuid +inode +inodes +isatty +lchown +setgid +setgroups +settime +setuid +socktype +statfs +statvfs +strcmp +strerror +syncfs +umask +waitpid +wcslen + +# * vars/nix +iovec +unistd + +# * vars/signals +SIGPIPE + +# * vars/std +CString +pathbuf + +# * vars/stat +bavail +bfree +bsize +ffree +frsize +fsid +fstat +fstype +namelen +# unix::fs::MetadataExt +atime # access time +blksize # blocksize for file system I/O +blocks # number of blocks allocated to file +ctime # creation time +dev # ID of device containing the file +gid # group ID of file owner +ino # inode number +mode # permissions +mtime # modification time +nlink # number of hard links to file +rdev # device ID if file is a character/block special file +size # total size of file in bytes +uid # user ID of file owner +nsec # nanosecond measurement scale +# freebsd::MetadataExt +iosize + +# * vars/time +Timespec +isdst +nanos +nsec +nsecs +strftime +strptime +subsec +usec +usecs +utcoff + +# * vars/utmpx +endutxent +getutxent +getutxid +getutxline +pututxline +setutxent +utmp +utmpx +utmpxname + +# * vars/winapi +DWORD +SYSTEMTIME +LPVOID +LPWSTR +ULONG +ULONGLONG +UNLEN +WCHAR +errhandlingapi +fileapi +handleapi +lmcons +minwinbase +minwindef +processthreadsapi +synchapi +sysinfoapi +winbase +winerror +winnt +winsock + +# * vars/uucore +optflag +optflagmulti +optflagopt +optmulti +optopt + +# * uutils +ccmd +coreopts +coreutils +keepenv +libc +libstdbuf +musl +tmpd +ucmd +ucommand +utmpx +uucore +uucore_procs +uumain +uutil +uutils diff --git a/.vscode/extensions.json b/.vscode/extensions.json index cb28d8883..46b105d37 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,10 +1,12 @@ { - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format + // spell-checker:ignore (misc) matklad + // see for the documentation about the extensions.json format "recommendations": [ // Rust language support. "rust-lang.rust", // Provides support for rust-analyzer: novel LSP server for the Rust programming language. - "matklad.rust-analyzer" + "matklad.rust-analyzer", + // `cspell` spell-checker support + "streetsidesoftware.code-spell-checker" ] } diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6c50b811d..d196c6e95 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -5,7 +5,7 @@ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, +identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. diff --git a/Cargo.lock b/Cargo.lock index 1365049a9..17fa9e2b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,7 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - [[package]] name = "Inflector" version = "0.11.4" @@ -146,9 +144,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.67" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" +checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" [[package]] name = "cfg-if" @@ -225,6 +223,7 @@ name = "coreutils" version = "0.0.6" dependencies = [ "atty", + "chrono", "conv", "filetime", "glob 0.3.0", @@ -296,6 +295,7 @@ dependencies = [ "uu_paste", "uu_pathchk", "uu_pinky", + "uu_pr", "uu_printenv", "uu_printf", "uu_ptx", @@ -466,9 +466,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52fb27eab85b17fbb9f6fd667089e07d6a2eb8743d02639ee7f6a7a7729c9c94" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -479,11 +479,10 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" dependencies = [ - "autocfg", "cfg-if 1.0.0", "lazy_static", ] @@ -513,28 +512,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "csv" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" -dependencies = [ - "bstr", - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" -dependencies = [ - "memchr 2.4.0", -] - [[package]] name = "ctor" version = "0.1.20" @@ -887,9 +864,9 @@ checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" [[package]] name = "memoffset" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" dependencies = [ "autocfg", ] @@ -954,7 +931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" dependencies = [ "winapi 0.3.9", - ] +] [[package]] name = "num-bigint" @@ -1191,6 +1168,12 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + [[package]] name = "quickcheck" version = "0.9.2" @@ -1651,18 +1634,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" +checksum = "fa6f76457f59514c7eeb4e59d891395fab0b2fd1d40723ae737d64153392e9c6" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" +checksum = "8a36768c0fbf1bb15eca10defa29526bda730a2376c2ab4393ccfa16fb1a318d" dependencies = [ "proc-macro2", "quote 1.0.9", @@ -1853,7 +1836,7 @@ dependencies = [ "filetime", "ioctl-sys", "libc", - "quick-error", + "quick-error 1.2.3", "uucore", "uucore_procs", "walkdir", @@ -2330,6 +2313,20 @@ dependencies = [ "uucore_procs", ] +[[package]] +name = "uu_pr" +version = "0.0.6" +dependencies = [ + "chrono", + "getopts", + "itertools 0.10.0", + "quick-error 2.0.1", + "regex", + "time", + "uucore", + "uucore_procs", +] + [[package]] name = "uu_printenv" version = "0.0.6" @@ -2424,6 +2421,8 @@ name = "uu_seq" version = "0.0.6" dependencies = [ "clap", + "num-bigint", + "num-traits", "uucore", "uucore_procs", ] diff --git a/Cargo.toml b/Cargo.toml index 3412ff9f3..9a6e8bd46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,6 +65,7 @@ feat_common_core = [ "nl", "od", "paste", + "pr", "printenv", "printf", "ptx", @@ -285,6 +286,7 @@ od = { optional=true, version="0.0.6", package="uu_od", path="src/uu/od" } paste = { optional=true, version="0.0.6", package="uu_paste", path="src/uu/paste" } pathchk = { optional=true, version="0.0.6", package="uu_pathchk", path="src/uu/pathchk" } pinky = { optional=true, version="0.0.6", package="uu_pinky", path="src/uu/pinky" } +pr = { optional=true, version="0.0.6", package="uu_pr", path="src/uu/pr" } printenv = { optional=true, version="0.0.6", package="uu_printenv", path="src/uu/printenv" } printf = { optional=true, version="0.0.6", package="uu_printf", path="src/uu/printf" } ptx = { optional=true, version="0.0.6", package="uu_ptx", path="src/uu/ptx" } @@ -334,6 +336,7 @@ yes = { optional=true, version="0.0.6", package="uu_yes", path="src/uu/yes" #pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`) [dev-dependencies] +chrono = "0.4.11" conv = "0.3" filetime = "0.2" glob = "0.3.0" diff --git a/DEVELOPER_INSTRUCTIONS.md b/DEVELOPER_INSTRUCTIONS.md index 3aa8b5b12..e0a5cf001 100644 --- a/DEVELOPER_INSTRUCTIONS.md +++ b/DEVELOPER_INSTRUCTIONS.md @@ -1,6 +1,8 @@ Code Coverage Report Generation --------------------------------- + + Code coverage report can be generated using [grcov](https://github.com/mozilla/grcov). ### Using Nightly Rust @@ -17,7 +19,7 @@ $ grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-exist $ # open target/debug/coverage/index.html in browser ``` -if changes are not reflected in the report then run `cargo clean` and run the above commands. +if changes are not reflected in the report then run `cargo clean` and run the above commands. ### Using Stable Rust diff --git a/GNUmakefile b/GNUmakefile index 409a527cd..102856b66 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,3 +1,5 @@ +# spell-checker:ignore (misc) testsuite runtest (targets) busytest distclean manpages pkgs ; (vars/env) BINDIR BUILDDIR CARGOFLAGS DESTDIR DOCSDIR INSTALLDIR INSTALLEES MANDIR MULTICALL + # Config options PROFILE ?= debug MULTICALL ?= n @@ -82,6 +84,7 @@ PROGS := \ nproc \ od \ paste \ + pr \ printenv \ printf \ ptx \ @@ -188,6 +191,7 @@ TEST_PROGS := \ paste \ pathchk \ pinky \ + pr \ printf \ ptx \ pwd \ @@ -274,7 +278,7 @@ busybox-src: $(BUILDDIR)/.config: $(BASEDIR)/.busybox-config cp $< $@ -# Test under the busybox testsuite +# Test under the busybox test suite $(BUILDDIR)/busybox: busybox-src build-coreutils $(BUILDDIR)/.config cp $(BUILDDIR)/coreutils $(BUILDDIR)/busybox; \ chmod +x $@; diff --git a/Makefile b/Makefile index 044aaa770..f56df90fb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -USEGNU=gmake $* +UseGNU=gmake $* all: - @$(USEGNU) + @$(UseGNU) .DEFAULT: - @$(USEGNU) + @$(UseGNU) diff --git a/README.md b/README.md index 1365bf7ce..8ab4c6128 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ----------------------------------------------- - + uutils is an attempt at writing universal (as in cross-platform) CLI utilities in [Rust](http://www.rust-lang.org). This repository is intended to @@ -300,13 +300,13 @@ $ make UTILS='UTILITY_1 UTILITY_2' SPEC=y test This testing functionality is only available on *nix operating systems and requires `make`. -To run busybox's tests for all utilities for which busybox has tests +To run busybox tests for all utilities for which busybox has tests ```bash $ make busytest ``` -To run busybox's tests for a few of the available utilities +To run busybox tests for a few of the available utilities ```bash $ make UTILS='UTILITY_1 UTILITY_2' busytest @@ -323,6 +323,7 @@ $ make UTILS='UTILITY_1 UTILITY_2' RUNTEST_ARGS='-v' busytest ![Evolution over time](https://github.com/uutils/coreutils-tracking/blob/main/gnu-results.png?raw=true) To run locally: + ```bash $ bash util/build-gnu.sh $ bash util/run-gnu-test.sh @@ -337,12 +338,12 @@ To contribute to uutils, please see [CONTRIBUTING](CONTRIBUTING.md). | Done | Semi-Done | To Do | |-----------|-----------|--------| | arch | cp | chcon | -| base32 | expr | dd | -| base64 | install | numfmt | -| basename | ls | pr | -| cat | more | runcon | -| chgrp | od (`--strings` and 128-bit data types missing) | stty | -| chmod | printf | | +| base32 | expr | csplit | +| base64 | install | dd | +| basename | ls | df | +| cat | more | numfmt | +| chgrp | od (`--strings` and 128-bit data types missing) | runcon | +| chmod | printf | stty | | chown | sort | | | chroot | split | | | cksum | tail | | @@ -351,7 +352,7 @@ To contribute to uutils, please see [CONTRIBUTING](CONTRIBUTING.md). | cut | join | | | dircolors | df | | | dirname | tac | | -| du | | | +| du | pr | | | echo | | | | env | | | | expand | | | diff --git a/docs/GNUmakefile b/docs/GNUmakefile index 894a53be0..49d827da8 100644 --- a/docs/GNUmakefile +++ b/docs/GNUmakefile @@ -1,5 +1,6 @@ +# spell-checker:ignore (vars/env) SPHINXOPTS SPHINXBUILD SPHINXPROJ SOURCEDIR BUILDDIR + # Minimal makefile for Sphinx documentation -# # You can set these variables from the command line. SPHINXOPTS = diff --git a/docs/Makefile b/docs/Makefile index 044aaa770..f56df90fb 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,5 +1,5 @@ -USEGNU=gmake $* +UseGNU=gmake $* all: - @$(USEGNU) + @$(UseGNU) .DEFAULT: - @$(USEGNU) + @$(UseGNU) diff --git a/docs/compiles_table.py b/docs/compiles_table.py index a051287c9..aa1b8703c 100644 --- a/docs/compiles_table.py +++ b/docs/compiles_table.py @@ -10,6 +10,8 @@ from pathlib import Path # third party dependencies from tqdm import tqdm +# spell-checker:ignore (libs) tqdm imap ; (shell/mac) xcrun ; (vars) nargs + BINS_PATH=Path("../src/uu") CACHE_PATH=Path("compiles_table.csv") TARGETS = [ @@ -50,7 +52,7 @@ TARGETS = [ class Target(str): def __new__(cls, content): obj = super().__new__(cls, content) - obj.arch, obj.platfrom, obj.os = Target.parse(content) + obj.arch, obj.platform, obj.os = Target.parse(content) return obj @staticmethod diff --git a/docs/conf.py b/docs/conf.py index 74e5e1fb8..5a1213627 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,6 +21,8 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +# spell-checker:ignore (words) howto htbp imgmath toctree todos uutilsdoc + import glob import os import re @@ -180,6 +182,6 @@ for name in glob.glob('*.rst'): # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'uutils', 'uutils Documentation', - author, 'uutils', 'A cross-platform reimplementation of GNU coreutils in Rust.', + author, 'uutils', 'A cross-platform implementation of GNU coreutils, written in Rust.', 'Miscellaneous'), ] diff --git a/docs/index.rst b/docs/index.rst index 4d70d4368..7f782b12a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,8 +3,11 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to uutils's documentation! -================================== +.. + spell-checker:ignore (directives) genindex maxdepth modindex toctree ; (misc) quickstart + +Welcome to uutils' documentation! +================================= .. toctree:: :maxdepth: 2 diff --git a/docs/make.bat b/docs/make.bat index 1e8ea10a0..6e63e3baa 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -1,5 +1,8 @@ +@setLocal @ECHO OFF +rem spell-checker:ignore (vars/env) BUILDDIR SOURCEDIR SPHINXBUILD SPHINXOPTS SPHINXPROJ + pushd %~dp0 REM Command file for Sphinx documentation @@ -14,7 +17,7 @@ set SPHINXPROJ=uutils if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( +if ErrorLevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point diff --git a/src/bin/coreutils.rs b/src/bin/coreutils.rs index 7fc494020..2e703b682 100644 --- a/src/bin/coreutils.rs +++ b/src/bin/coreutils.rs @@ -58,7 +58,7 @@ fn main() { // binary name equals prefixed util name? // * prefix/stem may be any string ending in a non-alphanumeric character - let utilname = if let Some(util) = utils.keys().find(|util| { + let util_name = if let Some(util) = utils.keys().find(|util| { binary_as_util.ends_with(*util) && !(&binary_as_util[..binary_as_util.len() - (*util).len()]) .ends_with(char::is_alphanumeric) @@ -71,7 +71,7 @@ fn main() { }; // 0th argument equals util name? - if let Some(util_os) = utilname { + if let Some(util_os) = util_name { let util = util_os.as_os_str().to_string_lossy(); match utils.get(&util[..]) { diff --git a/src/uu/arch/src/main.rs b/src/uu/arch/src/main.rs index 43e0af5bf..e2668864c 100644 --- a/src/uu/arch/src/main.rs +++ b/src/uu/arch/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_arch); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_arch); diff --git a/src/uu/base32/src/main.rs b/src/uu/base32/src/main.rs index b59cb89f0..83a0b6607 100644 --- a/src/uu/base32/src/main.rs +++ b/src/uu/base32/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_base32); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_base32); diff --git a/src/uu/base64/src/main.rs b/src/uu/base64/src/main.rs index 07ed34256..cae6cb3c4 100644 --- a/src/uu/base64/src/main.rs +++ b/src/uu/base64/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_base64); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_base64); diff --git a/src/uu/basename/src/main.rs b/src/uu/basename/src/main.rs index d1aa19f2b..aa452f750 100644 --- a/src/uu/basename/src/main.rs +++ b/src/uu/basename/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_basename); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_basename); diff --git a/src/uu/cat/src/main.rs b/src/uu/cat/src/main.rs index 2b7969473..1adab666b 100644 --- a/src/uu/cat/src/main.rs +++ b/src/uu/cat/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_cat); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_cat); diff --git a/src/uu/cat/src/splice.rs b/src/uu/cat/src/splice.rs index bd6be60f1..0b46fc662 100644 --- a/src/uu/cat/src/splice.rs +++ b/src/uu/cat/src/splice.rs @@ -9,7 +9,7 @@ const BUF_SIZE: usize = 1024 * 16; /// This function is called from `write_fast()` on Linux and Android. The /// function `splice()` is used to move data between two file descriptors -/// without copying between kernel- and userspace. This results in a large +/// without copying between kernel and user spaces. This results in a large /// speedup. /// /// The `bool` in the result value indicates if we need to fall back to normal diff --git a/src/uu/chgrp/src/main.rs b/src/uu/chgrp/src/main.rs index 2faba7ba4..ee6f70a8b 100644 --- a/src/uu/chgrp/src/main.rs +++ b/src/uu/chgrp/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_chgrp); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_chgrp); diff --git a/src/uu/chmod/src/chmod.rs b/src/uu/chmod/src/chmod.rs index c4bf309d6..62faacffe 100644 --- a/src/uu/chmod/src/chmod.rs +++ b/src/uu/chmod/src/chmod.rs @@ -112,7 +112,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { Arg::with_name(options::MODE) .required_unless(options::REFERENCE) .takes_value(true), - // It would be nice if clap could parse with delimeter, e.g. "g-x,u+x", + // It would be nice if clap could parse with delimiter, e.g. "g-x,u+x", // however .multiple(true) cannot be used here because FILE already needs that. // Only one positional argument with .multiple(true) set is allowed per command ) diff --git a/src/uu/chmod/src/main.rs b/src/uu/chmod/src/main.rs index 604bd9a7d..adaf887f8 100644 --- a/src/uu/chmod/src/main.rs +++ b/src/uu/chmod/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_chmod); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_chmod); diff --git a/src/uu/chown/src/main.rs b/src/uu/chown/src/main.rs index ee5aeeba0..b3ed39970 100644 --- a/src/uu/chown/src/main.rs +++ b/src/uu/chown/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_chown); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_chown); diff --git a/src/uu/chroot/src/main.rs b/src/uu/chroot/src/main.rs index a177c9301..0ca88cfaf 100644 --- a/src/uu/chroot/src/main.rs +++ b/src/uu/chroot/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_chroot); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_chroot); diff --git a/src/uu/cksum/src/cksum.rs b/src/uu/cksum/src/cksum.rs index 1d45c1332..b6f798d5e 100644 --- a/src/uu/cksum/src/cksum.rs +++ b/src/uu/cksum/src/cksum.rs @@ -99,15 +99,15 @@ const fn crc_entry(input: u8) -> u32 { // i += 1; //} unroll!(8, |_i| { - let if_cond = crc & 0x8000_0000; + let if_condition = crc & 0x8000_0000; let if_body = (crc << 1) ^ 0x04c1_1db7; let else_body = crc << 1; // NOTE: i feel like this is easier to understand than emulating an if statement in bitwise // ops - let cond_table = [else_body, if_body]; + let condition_table = [else_body, if_body]; - crc = cond_table[(if_cond != 0) as usize]; + crc = condition_table[(if_condition != 0) as usize]; }); crc diff --git a/src/uu/cksum/src/main.rs b/src/uu/cksum/src/main.rs index 50f424f41..b8a8f6b33 100644 --- a/src/uu/cksum/src/main.rs +++ b/src/uu/cksum/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_cksum); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_cksum); diff --git a/src/uu/comm/src/main.rs b/src/uu/comm/src/main.rs index 149098c3c..07ac07544 100644 --- a/src/uu/comm/src/main.rs +++ b/src/uu/comm/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_comm); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_comm); diff --git a/src/uu/cp/src/cp.rs b/src/uu/cp/src/cp.rs index 4d9e5965e..b7c64928f 100644 --- a/src/uu/cp/src/cp.rs +++ b/src/uu/cp/src/cp.rs @@ -1335,7 +1335,7 @@ fn copy_on_write_macos(source: &Path, dest: &Path, mode: ReflinkMode) -> CopyRes } if raw_pfn.is_null() || error != 0 { - // clonefile(2) is not supported or it error'ed out (possibly because the FS does not + // clonefile(2) is either not supported or it errored out (possibly because the FS does not // support COW). match mode { ReflinkMode::Always => { diff --git a/src/uu/cp/src/main.rs b/src/uu/cp/src/main.rs index 425d490e7..acfcfd1b2 100644 --- a/src/uu/cp/src/main.rs +++ b/src/uu/cp/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_cp); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_cp); diff --git a/src/uu/csplit/src/csplit.rs b/src/uu/csplit/src/csplit.rs index 43f95fff5..a2eb8604a 100644 --- a/src/uu/csplit/src/csplit.rs +++ b/src/uu/csplit/src/csplit.rs @@ -13,10 +13,10 @@ use std::{ mod csplit_error; mod patterns; -mod splitname; +mod split_name; use crate::csplit_error::CsplitError; -use crate::splitname::SplitName; +use crate::split_name::SplitName; use uucore::InvalidEncodingHandling; static VERSION: &str = env!("CARGO_PKG_VERSION"); @@ -77,7 +77,7 @@ impl CsplitOptions { /// # Errors /// /// - [`io::Error`] if there is some problem reading/writing from/to a file. -/// - [`::CsplitError::LineOutOfRange`] if the linenum pattern is larger than the number of input +/// - [`::CsplitError::LineOutOfRange`] if the line number pattern is larger than the number of input /// lines. /// - [`::CsplitError::LineOutOfRangeOnRepetition`], like previous but after applying the pattern /// more than once. diff --git a/src/uu/csplit/src/main.rs b/src/uu/csplit/src/main.rs index 97aeb3821..b0b144e8c 100644 --- a/src/uu/csplit/src/main.rs +++ b/src/uu/csplit/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_csplit); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_csplit); diff --git a/src/uu/csplit/src/patterns.rs b/src/uu/csplit/src/patterns.rs index d2f14578a..5621d18a3 100644 --- a/src/uu/csplit/src/patterns.rs +++ b/src/uu/csplit/src/patterns.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (regex) SKIPTO UPTO ; (vars) ntimes + use crate::csplit_error::CsplitError; use regex::Regex; @@ -167,7 +169,7 @@ fn validate_line_numbers(patterns: &[Pattern]) -> Result<(), CsplitError> { .try_fold(0, |prev_ln, ¤t_ln| match (prev_ln, current_ln) { // a line number cannot be zero (_, 0) => Err(CsplitError::LineNumberIsZero), - // two consecutifs numbers should not be equal + // two consecutive numbers should not be equal (n, m) if n == m => { show_warning!("line number '{}' is the same as preceding line number", n); Ok(n) diff --git a/src/uu/csplit/src/splitname.rs b/src/uu/csplit/src/split_name.rs similarity index 98% rename from src/uu/csplit/src/splitname.rs rename to src/uu/csplit/src/split_name.rs index 66b17ba67..6db781e9b 100644 --- a/src/uu/csplit/src/splitname.rs +++ b/src/uu/csplit/src/split_name.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (regex) diuox + use regex::Regex; use crate::csplit_error::CsplitError; @@ -225,6 +227,8 @@ impl SplitName { #[cfg(test)] mod tests { + // spell-checker:ignore (path) xxcst + use super::*; #[test] @@ -319,13 +323,13 @@ mod tests { } #[test] - fn zero_padding_lower_hexa() { + fn zero_padding_lower_hex() { let split_name = SplitName::new(None, Some(String::from("cst-%03x-")), None).unwrap(); assert_eq!(split_name.get(42), "xxcst-02a-"); } #[test] - fn zero_padding_upper_hexa() { + fn zero_padding_upper_hex() { let split_name = SplitName::new(None, Some(String::from("cst-%03X-")), None).unwrap(); assert_eq!(split_name.get(42), "xxcst-02A-"); } @@ -337,13 +341,13 @@ mod tests { } #[test] - fn alternate_form_lower_hexa() { + fn alternate_form_lower_hex() { let split_name = SplitName::new(None, Some(String::from("cst-%#10x-")), None).unwrap(); assert_eq!(split_name.get(42), "xxcst- 0x2a-"); } #[test] - fn alternate_form_upper_hexa() { + fn alternate_form_upper_hex() { let split_name = SplitName::new(None, Some(String::from("cst-%#10X-")), None).unwrap(); assert_eq!(split_name.get(42), "xxcst- 0x2A-"); } @@ -373,13 +377,13 @@ mod tests { } #[test] - fn left_adjusted_lower_hexa() { + fn left_adjusted_lower_hex() { let split_name = SplitName::new(None, Some(String::from("cst-%-10x-")), None).unwrap(); assert_eq!(split_name.get(42), "xxcst-0x2a -"); } #[test] - fn left_adjusted_upper_hexa() { + fn left_adjusted_upper_hex() { let split_name = SplitName::new(None, Some(String::from("cst-%-10X-")), None).unwrap(); assert_eq!(split_name.get(42), "xxcst-0x2A -"); } diff --git a/src/uu/cut/src/main.rs b/src/uu/cut/src/main.rs index 065a01f40..8822335f6 100644 --- a/src/uu/cut/src/main.rs +++ b/src/uu/cut/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_cut); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_cut); diff --git a/src/uu/date/usage.txt b/src/uu/date/date-usage.mkd similarity index 97% rename from src/uu/date/usage.txt rename to src/uu/date/date-usage.mkd index 12df1a03c..829001095 100644 --- a/src/uu/date/usage.txt +++ b/src/uu/date/date-usage.mkd @@ -1,3 +1,8 @@ +# `date` usage + + + +``` text FORMAT controls the output. Interpreted sequences are: %% a literal % @@ -70,3 +75,4 @@ Show the time on the west coast of the US (use tzselect(1) to find TZ) Show the local time for 9AM next Friday on the west coast of the US $ date --date='TZ="America/Los_Angeles" 09:00 next Fri' +``` diff --git a/src/uu/date/src/date.rs b/src/uu/date/src/date.rs index 1fe80c03f..02aa7a60d 100644 --- a/src/uu/date/src/date.rs +++ b/src/uu/date/src/date.rs @@ -6,8 +6,7 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// spell-checker:ignore (format) MMDDhhmm -// spell-checker:ignore (ToDO) DATEFILE +// spell-checker:ignore (chrono) Datelike Timelike ; (format) DATEFILE MMDDhhmm ; (vars) datetime datetimes #[macro_use] extern crate uucore; diff --git a/src/uu/date/src/main.rs b/src/uu/date/src/main.rs index 13edc0fba..9064c7f67 100644 --- a/src/uu/date/src/main.rs +++ b/src/uu/date/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_date); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_date); diff --git a/src/uu/df/src/df.rs b/src/uu/df/src/df.rs index 8219b0a27..07f8b0214 100644 --- a/src/uu/df/src/df.rs +++ b/src/uu/df/src/df.rs @@ -6,9 +6,6 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// spell-checker:ignore (ToDO) mountinfo BLOCKSIZE fobj mptr noatime Iused overmounted -// spell-checker:ignore (libc/fs) asyncreads asyncwrites autofs bavail bfree bsize charspare cifs debugfs devfs devpts ffree frsize fsid fstypename fusectl inode inodes iosize kernfs mntbufp mntfromname mntonname mqueue namemax pipefs smbfs statvfs subfs syncreads syncwrites sysfs wcslen - #[macro_use] extern crate uucore; #[cfg(unix)] @@ -78,7 +75,7 @@ struct Options { #[derive(Debug, Clone)] struct Filesystem { - mountinfo: MountInfo, + mount_info: MountInfo, usage: FsUsage, } @@ -131,19 +128,19 @@ impl Options { } impl Filesystem { - // TODO: resolve uuid in `mountinfo.dev_name` if exists - fn new(mountinfo: MountInfo) -> Option { - let _stat_path = if !mountinfo.mount_dir.is_empty() { - mountinfo.mount_dir.clone() + // TODO: resolve uuid in `mount_info.dev_name` if exists + fn new(mount_info: MountInfo) -> Option { + let _stat_path = if !mount_info.mount_dir.is_empty() { + mount_info.mount_dir.clone() } else { #[cfg(unix)] { - mountinfo.dev_name.clone() + mount_info.dev_name.clone() } #[cfg(windows)] { // On windows, we expect the volume id - mountinfo.dev_id.clone() + mount_info.dev_id.clone() } }; #[cfg(unix)] @@ -154,14 +151,14 @@ impl Filesystem { None } else { Some(Filesystem { - mountinfo, + mount_info, usage: FsUsage::new(statvfs), }) } } #[cfg(windows)] Some(Filesystem { - mountinfo, + mount_info, usage: FsUsage::new(Path::new(&_stat_path)), }) } @@ -205,7 +202,7 @@ fn filter_mount_list(vmi: Vec, paths: &[String], opt: &Options) -> Ve if (!mi.dev_name.starts_with('/') || seen.dev_name.starts_with('/')) // let points towards the root of the device win. && (!target_nearer_root || source_below_root) - // let an entry overmounted on a new device win... + // let an entry over-mounted on a new device win... && (seen.dev_name == mi.dev_name /* ... but only when matching an existing mnt point, to avoid problematic replacement when given @@ -431,6 +428,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { header.push("Type"); } header.extend_from_slice(&if opt.show_inode_instead { + // spell-checker:disable-next-line ["Inodes", "Iused", "IFree", "IUses%"] } else { [ @@ -462,9 +460,9 @@ pub fn uumain(args: impl uucore::Args) -> i32 { } println!(); for fs in fs_list.iter() { - print!("{0: <16} ", fs.mountinfo.dev_name); + print!("{0: <16} ", fs.mount_info.dev_name); if opt.show_fs_type { - print!("{0: <5} ", fs.mountinfo.fs_type); + print!("{0: <5} ", fs.mount_info.fs_type); } if opt.show_inode_instead { print!( @@ -508,7 +506,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { } print!("{0: >5} ", use_size(free_size, total_size)); } - print!("{0: <16}", fs.mountinfo.mount_dir); + print!("{0: <16}", fs.mount_info.mount_dir); println!(); } diff --git a/src/uu/df/src/main.rs b/src/uu/df/src/main.rs index 6062603db..a6d403782 100644 --- a/src/uu/df/src/main.rs +++ b/src/uu/df/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_df); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_df); diff --git a/src/uu/dircolors/src/main.rs b/src/uu/dircolors/src/main.rs index 10c96ecd9..a6a820bd9 100644 --- a/src/uu/dircolors/src/main.rs +++ b/src/uu/dircolors/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_dircolors); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_dircolors); diff --git a/src/uu/dirname/src/main.rs b/src/uu/dirname/src/main.rs index e4be3372a..bf923e86a 100644 --- a/src/uu/dirname/src/main.rs +++ b/src/uu/dirname/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_dirname); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_dirname); diff --git a/src/uu/du/src/du.rs b/src/uu/du/src/du.rs index 8394741cc..5dfb41d82 100644 --- a/src/uu/du/src/du.rs +++ b/src/uu/du/src/du.rs @@ -5,8 +5,6 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// spell-checker:ignore (ToDO) BLOCKSIZE inode inodes ment strs - #[macro_use] extern crate uucore; @@ -64,14 +62,13 @@ const VERSION: &str = env!("CARGO_PKG_VERSION"); const NAME: &str = "du"; const SUMMARY: &str = "estimate file space usage"; const LONG_HELP: &str = " - Display values are in units of the first available SIZE from - --block-size, and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environ‐ - ment variables. Otherwise, units default to 1024 bytes (or 512 if - POSIXLY_CORRECT is set). +Display values are in units of the first available SIZE from --block-size, +and the DU_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables. +Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set). - SIZE is an integer and optional unit (example: 10M is 10*1024*1024). - Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB, ... (pow‐ - ers of 1000). +SIZE is an integer and optional unit (example: 10M is 10*1024*1024). +Units are K, M, G, T, P, E, Z, Y (powers of 1024) or KB, MB,... (powers +of 1000). "; // TODO: Support Z & Y (currently limited by size of u64) @@ -557,7 +554,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { separate_dirs: matches.is_present(options::SEPARATE_DIRS), }; - let strs = match matches.value_of(options::FILE) { + let files = match matches.value_of(options::FILE) { Some(_) => matches.values_of(options::FILE).unwrap().collect(), None => { vec!["./"] // TODO: gnu `du` doesn't use trailing "/" here @@ -615,8 +612,8 @@ Try '{} --help' for more information.", }; let mut grand_total = 0; - for path_str in strs { - let path = PathBuf::from(&path_str); + for path_string in files { + let path = PathBuf::from(&path_string); match Stat::new(path) { Ok(stat) => { let mut inodes: HashSet = HashSet::new(); @@ -678,13 +675,13 @@ Try '{} --help' for more information.", } if options.total && index == (len - 1) { // The last element will be the total size of the the path under - // path_str. We add it to the grand total. + // path_string. We add it to the grand total. grand_total += size; } } } Err(_) => { - show_error!("{}: {}", path_str, "No such file or directory"); + show_error!("{}: {}", path_string, "No such file or directory"); } } } diff --git a/src/uu/du/src/main.rs b/src/uu/du/src/main.rs index de1967bc8..de9bfc1a5 100644 --- a/src/uu/du/src/main.rs +++ b/src/uu/du/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_du); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_du); diff --git a/src/uu/echo/src/main.rs b/src/uu/echo/src/main.rs index 00b84e983..b8d3b4b32 100644 --- a/src/uu/echo/src/main.rs +++ b/src/uu/echo/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_echo); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_echo); diff --git a/src/uu/env/src/env.rs b/src/uu/env/src/env.rs index 83927b160..50a327260 100644 --- a/src/uu/env/src/env.rs +++ b/src/uu/env/src/env.rs @@ -7,7 +7,7 @@ /* last synced with: env (GNU coreutils) 8.13 */ -// spell-checker:ignore (ToDO) execvp progname subcommand subcommands unsets +// spell-checker:ignore (ToDO) chdir execvp progname subcommand subcommands unsets #[macro_use] extern crate clap; diff --git a/src/uu/env/src/main.rs b/src/uu/env/src/main.rs index 8b654eb00..9c19a3ab4 100644 --- a/src/uu/env/src/main.rs +++ b/src/uu/env/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_env); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_env); diff --git a/src/uu/expand/src/main.rs b/src/uu/expand/src/main.rs index d80b6090f..a154b36be 100644 --- a/src/uu/expand/src/main.rs +++ b/src/uu/expand/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_expand); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_expand); diff --git a/src/uu/expr/src/main.rs b/src/uu/expr/src/main.rs index 4268865df..6fdd6be14 100644 --- a/src/uu/expr/src/main.rs +++ b/src/uu/expr/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_expr); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_expr); diff --git a/src/uu/factor/BENCHMARKING.md b/src/uu/factor/BENCHMARKING.md index e174d62b7..6bf9cbf90 100644 --- a/src/uu/factor/BENCHMARKING.md +++ b/src/uu/factor/BENCHMARKING.md @@ -1,5 +1,7 @@ # Benchmarking `factor` + + The benchmarks for `factor` are located under `tests/benches/factor` and can be invoked with `cargo bench` in that directory. @@ -7,19 +9,19 @@ They are located outside the `uu_factor` crate, as they do not comply with the project's minimum supported Rust version, *i.e.* may require a newer version of `rustc`. - ## Microbenchmarking deterministic functions We currently use [`criterion`] to benchmark deterministic functions, such as `gcd` and `table::factor`. -However, µbenchmarks are by nature unstable: not only are they specific to +However, microbenchmarks are by nature unstable: not only are they specific to the hardware, operating system version, etc., but they are noisy and affected by other tasks on the system (browser, compile jobs, etc.), which can cause `criterion` to report spurious performance improvements and regressions. -This can be mitigated by getting as close to [idealised conditions][lemire] +This can be mitigated by getting as close to [idealized conditions][lemire] as possible: + - minimize the amount of computation and I/O running concurrently to the benchmark, *i.e.* close your browser and IM clients, don't compile at the same time, etc. ; @@ -27,64 +29,60 @@ as possible: - [isolate a **physical** core], set it to `nohz_full`, and pin the benchmark to it, so it won't be preempted in the middle of a measurement ; - disable ASLR by running `setarch -R cargo bench`, so we can compare results - across multiple executions. - + across multiple executions. [`criterion`]: https://bheisler.github.io/criterion.rs/book/index.html [lemire]: https://lemire.me/blog/2018/01/16/microbenchmarking-calls-for-idealized-conditions/ [isolate a **physical** core]: https://pyperf.readthedocs.io/en/latest/system.html#isolate-cpus-on-linux -[frequency stays constant]: XXXTODO +[frequency stays constant]: ... - -### Guidance for designing µbenchmarks +### Guidance for designing microbenchmarks *Note:* this guidance is specific to `factor` and takes its application domain -into account; do not expect it to generalise to other projects. It is based +into account; do not expect it to generalize to other projects. It is based on Daniel Lemire's [*Microbenchmarking calls for idealized conditions*][lemire], which I recommend reading if you want to add benchmarks to `factor`. -1. Select a small, self-contained, deterministic component +1. Select a small, self-contained, deterministic component `gcd` and `table::factor` are good example of such: - no I/O or access to external data structures ; - no call into other components ; - - behaviour is deterministic: no RNG, no concurrency, ... ; + - behavior is deterministic: no RNG, no concurrency, ... ; - the test's body is *fast* (~100ns for `gcd`, ~10µs for `factor::table`), so each sample takes a very short time, minimizing variability and maximizing the numbers of samples we can take in a given time. -2. Benchmarks are immutable (once merged in `uutils`) +2. Benchmarks are immutable (once merged in `uutils`) Modifying a benchmark means previously-collected values cannot meaningfully be compared, silently giving nonsensical results. If you must modify an existing benchmark, rename it. -3. Test common cases +3. Test common cases We are interested in overall performance, rather than specific edge-cases; - use **reproducibly-randomised inputs**, sampling from either all possible + use **reproducibly-randomized inputs**, sampling from either all possible input values or some subset of interest. -4. Use [`criterion`], `criterion::black_box`, ... +4. Use [`criterion`], `criterion::black_box`, ... `criterion` isn't perfect, but it is also much better than ad-hoc solutions in each benchmark. - ## Wishlist ### Configurable statistical estimators -`criterion` always uses the arithmetic average as estimator; in µbenchmarks, +`criterion` always uses the arithmetic average as estimator; in microbenchmarks, where the code under test is fully deterministic and the measurements are subject to additive, positive noise, [the minimum is more appropriate][lemire]. - ### CI & reproducible performance testing Measuring performance on real hardware is important, as it relates directly to what users of `factor` experience; however, such measurements are subject to the constraints of the real-world, and aren't perfectly reproducible. -Moreover, the mitigations for it (described above) aren't achievable in +Moreover, the mitigation for it (described above) isn't achievable in virtualized, multi-tenant environments such as CI. -Instead, we could run the µbenchmarks in a simulated CPU with [`cachegrind`], +Instead, we could run the microbenchmarks in a simulated CPU with [`cachegrind`], measure execution “time” in that model (in CI), and use it to detect and report performance improvements and regressions. @@ -93,19 +91,17 @@ performance improvements and regressions. [`cachegrind`]: https://www.valgrind.org/docs/manual/cg-manual.html [`iai`]: https://bheisler.github.io/criterion.rs/book/iai/iai.html - -### Comparing randomised implementations across multiple inputs +### Comparing randomized implementations across multiple inputs `factor` is a challenging target for system benchmarks as it combines two characteristics: -1. integer factoring algorithms are randomised, with large variance in +1. integer factoring algorithms are randomized, with large variance in execution time ; 2. various inputs also have large differences in factoring time, that corresponds to no natural, linear ordering of the inputs. - If (1) was untrue (i.e. if execution time wasn't random), we could faithfully compare 2 implementations (2 successive versions, or `uutils` and GNU) using a scatter plot, where each axis corresponds to the perf. of one implementation. diff --git a/src/uu/factor/build.rs b/src/uu/factor/build.rs index eff21ae2f..32640d61a 100644 --- a/src/uu/factor/build.rs +++ b/src/uu/factor/build.rs @@ -13,8 +13,6 @@ //! 2 has no multiplicative inverse mode 2^64 because 2 | 2^64, //! and in any case divisibility by two is trivial by checking the LSB. -// spell-checker:ignore (ToDO) invs newr newrp newtp outstr - #![cfg_attr(test, allow(dead_code))] use std::env::{self, args}; @@ -60,13 +58,13 @@ fn main() { let mut x = primes.next().unwrap(); for next in primes { // format the table - let outstr = format!("({}, {}, {}),", x, modular_inverse(x), std::u64::MAX / x); - if cols + outstr.len() > MAX_WIDTH { - write!(file, "\n {}", outstr).unwrap(); - cols = 4 + outstr.len(); + let output = format!("({}, {}, {}),", x, modular_inverse(x), std::u64::MAX / x); + if cols + output.len() > MAX_WIDTH { + write!(file, "\n {}", output).unwrap(); + cols = 4 + output.len(); } else { - write!(file, " {}", outstr).unwrap(); - cols += 1 + outstr.len(); + write!(file, " {}", output).unwrap(); + cols += 1 + output.len(); } x = next; @@ -81,7 +79,7 @@ fn main() { } #[test] -fn test_generator_isprime() { +fn test_generator_is_prime() { assert_eq!(Sieve::odd_primes.take(10_000).all(is_prime)); } @@ -106,5 +104,5 @@ const PREAMBLE: &str = r##"/* // re-run src/factor/gen_tables.rs. #[allow(clippy::unreadable_literal)] -pub const P_INVS_U64: &[(u64, u64, u64)] = &[ +pub const PRIME_INVERSIONS_U64: &[(u64, u64, u64)] = &[ "##; diff --git a/src/uu/factor/src/factor.rs b/src/uu/factor/src/factor.rs index b279de7fc..54ad0bdd4 100644 --- a/src/uu/factor/src/factor.rs +++ b/src/uu/factor/src/factor.rs @@ -17,6 +17,7 @@ type Exponent = u8; #[derive(Clone, Debug)] struct Decomposition(SmallVec<[(u64, Exponent); NUM_FACTORS_INLINE]>); +// spell-checker:ignore (names) Erdős–Kac * Erdős Kac // The number of factors to inline directly into a `Decomposition` object. // As a consequence of the Erdős–Kac theorem, the average number of prime factors // of integers < 10²⁵ ≃ 2⁸³ is 4, so we can use a slightly higher value. @@ -250,6 +251,7 @@ impl Distribution for Standard { let mut g = 1u64; let mut n = u64::MAX; + // spell-checker:ignore (names) Adam Kalai * Kalai's // Adam Kalai's algorithm for generating uniformly-distributed // integers and their factorization. // diff --git a/src/uu/factor/src/main.rs b/src/uu/factor/src/main.rs index b251716b5..4d8b281b6 100644 --- a/src/uu/factor/src/main.rs +++ b/src/uu/factor/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_factor); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_factor); diff --git a/src/uu/factor/src/miller_rabin.rs b/src/uu/factor/src/miller_rabin.rs index 2a3b7bdf1..ec6d81c0f 100644 --- a/src/uu/factor/src/miller_rabin.rs +++ b/src/uu/factor/src/miller_rabin.rs @@ -21,6 +21,7 @@ impl Basis for Montgomery { } impl Basis for Montgomery { + // spell-checker:ignore (names) Steve Worley // Small set of bases for the Miller-Rabin prime test, valid for all 32b integers; // discovered by Steve Worley on 2013-05-27, see miller-rabin.appspot.com #[allow(clippy::unreadable_literal)] @@ -121,8 +122,8 @@ mod tests { } fn odd_primes() -> impl Iterator { - use crate::table::{NEXT_PRIME, P_INVS_U64}; - P_INVS_U64 + use crate::table::{NEXT_PRIME, PRIME_INVERSIONS_U64}; + PRIME_INVERSIONS_U64 .iter() .map(|(p, _, _)| *p) .chain(iter::once(NEXT_PRIME)) diff --git a/src/uu/factor/src/numeric/gcd.rs b/src/uu/factor/src/numeric/gcd.rs index 36ad833a6..004ef1515 100644 --- a/src/uu/factor/src/numeric/gcd.rs +++ b/src/uu/factor/src/numeric/gcd.rs @@ -93,7 +93,7 @@ mod tests { gcd(a, gcd(b, c)) == gcd(gcd(a, b), c) } - fn scalar_mult(a: u64, b: u64, k: u64) -> bool { + fn scalar_multiplication(a: u64, b: u64, k: u64) -> bool { gcd(k * a, k * b) == k * gcd(a, b) } diff --git a/src/uu/factor/src/numeric/modular_inverse.rs b/src/uu/factor/src/numeric/modular_inverse.rs index 763ee90a0..e4827a3ee 100644 --- a/src/uu/factor/src/numeric/modular_inverse.rs +++ b/src/uu/factor/src/numeric/modular_inverse.rs @@ -16,11 +16,11 @@ pub(crate) fn modular_inverse(a: T) -> T { debug_assert!(a % (one + one) == one, "{:?} is not odd", a); let mut t = zero; - let mut newt = one; + let mut new_t = one; let mut r = zero; - let mut newr = a; + let mut new_r = a; - while newr != zero { + while new_r != zero { let quot = if r == zero { // special case when we're just starting out // This works because we know that @@ -28,15 +28,15 @@ pub(crate) fn modular_inverse(a: T) -> T { T::max_value() } else { r - } / newr; + } / new_r; - let newtp = t.wrapping_sub(".wrapping_mul(&newt)); - t = newt; - newt = newtp; + let new_tp = t.wrapping_sub(".wrapping_mul(&new_t)); + t = new_t; + new_t = new_tp; - let newrp = r.wrapping_sub(".wrapping_mul(&newr)); - r = newr; - newr = newrp; + let new_rp = r.wrapping_sub(".wrapping_mul(&new_r)); + r = new_r; + new_r = new_rp; } debug_assert_eq!(r, one); diff --git a/src/uu/factor/src/numeric/montgomery.rs b/src/uu/factor/src/numeric/montgomery.rs index 8c38464bc..485025d87 100644 --- a/src/uu/factor/src/numeric/montgomery.rs +++ b/src/uu/factor/src/numeric/montgomery.rs @@ -69,7 +69,7 @@ impl Montgomery { let t_bits = T::zero().count_zeros() as usize; debug_assert!(x < (self.n.as_double_width()) << t_bits); - // TODO: optimiiiiiiise + // TODO: optimize let Montgomery { a, n } = self; let m = T::from_double_width(x).wrapping_mul(a); let nm = (n.as_double_width()) * (m.as_double_width()); @@ -138,7 +138,7 @@ impl Arithmetic for Montgomery { r + self.n.wrapping_neg() }; - // Normalise to [0; n[ + // Normalize to [0; n[ let r = if r < self.n { r } else { r - self.n }; // Check that r (reduced back to the usual representation) equals @@ -200,7 +200,7 @@ mod tests { } parametrized_check!(test_add); - fn test_mult() { + fn test_multiplication() { for n in 0..100 { let n = 2 * n + 1; let m = Montgomery::::new(n); @@ -213,7 +213,7 @@ mod tests { } } } - parametrized_check!(test_mult); + parametrized_check!(test_multiplication); fn test_roundtrip() { for n in 0..100 { diff --git a/src/uu/factor/src/table.rs b/src/uu/factor/src/table.rs index 518d4f241..6d4047e49 100644 --- a/src/uu/factor/src/table.rs +++ b/src/uu/factor/src/table.rs @@ -13,7 +13,7 @@ use crate::Factors; include!(concat!(env!("OUT_DIR"), "/prime_table.rs")); pub fn factor(num: &mut u64, factors: &mut Factors) { - for &(prime, inv, ceil) in P_INVS_U64 { + for &(prime, inv, ceil) in PRIME_INVERSIONS_U64 { if *num == 1 { break; } @@ -45,7 +45,7 @@ pub fn factor(num: &mut u64, factors: &mut Factors) { pub const CHUNK_SIZE: usize = 8; pub fn factor_chunk(n_s: &mut [u64; CHUNK_SIZE], f_s: &mut [Factors; CHUNK_SIZE]) { - for &(prime, inv, ceil) in P_INVS_U64 { + for &(prime, inv, ceil) in PRIME_INVERSIONS_U64 { if n_s[0] == 1 && n_s[1] == 1 && n_s[2] == 1 && n_s[3] == 1 { break; } diff --git a/src/uu/false/src/main.rs b/src/uu/false/src/main.rs index 0cede3b5e..382a16fc7 100644 --- a/src/uu/false/src/main.rs +++ b/src/uu/false/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_false); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_false); diff --git a/src/uu/fmt/src/main.rs b/src/uu/fmt/src/main.rs index d7e883ba7..35531a8b4 100644 --- a/src/uu/fmt/src/main.rs +++ b/src/uu/fmt/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_fmt); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_fmt); diff --git a/src/uu/fold/src/main.rs b/src/uu/fold/src/main.rs index abdf80211..1802f2cf8 100644 --- a/src/uu/fold/src/main.rs +++ b/src/uu/fold/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_fold); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_fold); diff --git a/src/uu/groups/src/main.rs b/src/uu/groups/src/main.rs index 0a37ec7f4..6efe64b54 100644 --- a/src/uu/groups/src/main.rs +++ b/src/uu/groups/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_groups); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_groups); diff --git a/src/uu/hashsum/src/hashsum.rs b/src/uu/hashsum/src/hashsum.rs index b1ba3c217..b39b5788c 100644 --- a/src/uu/hashsum/src/hashsum.rs +++ b/src/uu/hashsum/src/hashsum.rs @@ -370,7 +370,7 @@ pub fn uumain(mut args: impl uucore::Args) -> i32 { ); if !is_custom_binary(&binary_name) { - let algos = &[ + let algorithms = &[ ("md5", "work with MD5"), ("sha1", "work with SHA1"), ("sha224", "work with SHA224"), @@ -393,7 +393,7 @@ pub fn uumain(mut args: impl uucore::Args) -> i32 { ("b2sum", "work with BLAKE2"), ]; - for (name, desc) in algos { + for (name, desc) in algorithms { app = app.arg(Arg::with_name(name).long(name).help(desc)); } } diff --git a/src/uu/hashsum/src/main.rs b/src/uu/hashsum/src/main.rs index 12bd3b393..bc4e2f3be 100644 --- a/src/uu/hashsum/src/main.rs +++ b/src/uu/hashsum/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_hashsum); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_hashsum); diff --git a/src/uu/head/src/head.rs b/src/uu/head/src/head.rs index 78d769020..d67cc5b07 100644 --- a/src/uu/head/src/head.rs +++ b/src/uu/head/src/head.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (vars) zlines + use clap::{App, Arg}; use std::convert::TryFrom; use std::ffi::OsString; @@ -205,7 +207,7 @@ impl Default for HeadOptions { } } -fn rbuf_n_bytes(input: R, n: usize) -> std::io::Result<()> +fn read_n_bytes(input: R, n: usize) -> std::io::Result<()> where R: Read, { @@ -221,7 +223,7 @@ where Ok(()) } -fn rbuf_n_lines(input: &mut impl std::io::BufRead, n: usize, zero: bool) -> std::io::Result<()> { +fn read_n_lines(input: &mut impl std::io::BufRead, n: usize, zero: bool) -> std::io::Result<()> { if n == 0 { return Ok(()); } @@ -244,18 +246,18 @@ fn rbuf_n_lines(input: &mut impl std::io::BufRead, n: usize, zero: bool) -> std: }) } -fn rbuf_but_last_n_bytes(input: &mut impl std::io::BufRead, n: usize) -> std::io::Result<()> { +fn read_but_last_n_bytes(input: &mut impl std::io::BufRead, n: usize) -> std::io::Result<()> { if n == 0 { //prints everything - return rbuf_n_bytes(input, std::usize::MAX); + return read_n_bytes(input, std::usize::MAX); } let stdout = std::io::stdout(); let mut stdout = stdout.lock(); - let mut ringbuf = vec![0u8; n]; + let mut ring_buffer = vec![0u8; n]; // first we fill the ring buffer - if let Err(e) = input.read_exact(&mut ringbuf) { + if let Err(e) = input.read_exact(&mut ring_buffer) { if e.kind() == ErrorKind::UnexpectedEof { return Ok(()); } else { @@ -276,22 +278,22 @@ fn rbuf_but_last_n_bytes(input: &mut impl std::io::BufRead, n: usize) -> std::io if read == 0 { return Ok(()); } else if read >= n { - stdout.write_all(&ringbuf)?; + stdout.write_all(&ring_buffer)?; stdout.write_all(&buffer[..read - n])?; for i in 0..n { - ringbuf[i] = buffer[read - n + i]; + ring_buffer[i] = buffer[read - n + i]; } } else { - stdout.write_all(&ringbuf[..read])?; + stdout.write_all(&ring_buffer[..read])?; for i in 0..n - read { - ringbuf[i] = ringbuf[read + i]; + ring_buffer[i] = ring_buffer[read + i]; } - ringbuf[n - read..].copy_from_slice(&buffer[..read]); + ring_buffer[n - read..].copy_from_slice(&buffer[..read]); } } } -fn rbuf_but_last_n_lines( +fn read_but_last_n_lines( input: impl std::io::BufRead, n: usize, zero: bool, @@ -320,7 +322,7 @@ fn head_backwards_file(input: &mut std::fs::File, options: &HeadOptions) -> std: return Ok(()); } else { input.seek(SeekFrom::Start(0))?; - rbuf_n_bytes( + read_n_bytes( &mut std::io::BufReader::with_capacity(BUF_SIZE, input), size - n, )?; @@ -359,7 +361,7 @@ fn head_backwards_file(input: &mut std::fs::File, options: &HeadOptions) -> std: } }; input.seek(SeekFrom::Start(0))?; - rbuf_n_bytes( + read_n_bytes( &mut std::io::BufReader::with_capacity(BUF_SIZE, input), size - found, )?; @@ -374,9 +376,9 @@ fn head_file(input: &mut std::fs::File, options: &HeadOptions) -> std::io::Resul } else { match options.mode { Modes::Bytes(n) => { - rbuf_n_bytes(&mut std::io::BufReader::with_capacity(BUF_SIZE, input), n) + read_n_bytes(&mut std::io::BufReader::with_capacity(BUF_SIZE, input), n) } - Modes::Lines(n) => rbuf_n_lines( + Modes::Lines(n) => read_n_lines( &mut std::io::BufReader::with_capacity(BUF_SIZE, input), n, options.zeroed, @@ -388,8 +390,8 @@ fn head_file(input: &mut std::fs::File, options: &HeadOptions) -> std::io::Resul fn uu_head(options: &HeadOptions) -> Result<(), u32> { let mut error_count = 0; let mut first = true; - for fname in &options.files { - let res = match fname.as_str() { + for file in &options.files { + let res = match file.as_str() { "-" => { if (options.files.len() > 1 && !options.quiet) || options.verbose { if !first { @@ -402,16 +404,16 @@ fn uu_head(options: &HeadOptions) -> Result<(), u32> { match options.mode { Modes::Bytes(n) => { if options.all_but_last { - rbuf_but_last_n_bytes(&mut stdin, n) + read_but_last_n_bytes(&mut stdin, n) } else { - rbuf_n_bytes(&mut stdin, n) + read_n_bytes(&mut stdin, n) } } Modes::Lines(n) => { if options.all_but_last { - rbuf_but_last_n_lines(&mut stdin, n, options.zeroed) + read_but_last_n_lines(&mut stdin, n, options.zeroed) } else { - rbuf_n_lines(&mut stdin, n, options.zeroed) + read_n_lines(&mut stdin, n, options.zeroed) } } } @@ -446,10 +448,10 @@ fn uu_head(options: &HeadOptions) -> Result<(), u32> { } }; if res.is_err() { - let name = if fname.as_str() == "-" { + let name = if file.as_str() == "-" { "standard input" } else { - fname + file }; let prefix = format!("error reading {}", name); show_error_custom_description!(prefix, "Input/output error"); @@ -497,7 +499,7 @@ mod tests { } #[test] fn test_gnu_compatibility() { - let args = options("-n 1 -c 1 -n 5 -c kiB -vqvqv").unwrap(); + let args = options("-n 1 -c 1 -n 5 -c kiB -vqvqv").unwrap(); // spell-checker:disable-line assert!(args.mode == Modes::Bytes(1024)); assert!(args.verbose); assert_eq!(options("-5").unwrap().mode, Modes::Lines(5)); @@ -579,7 +581,7 @@ mod tests { ); //test that the obsolete syntax is unrolled assert_eq!( - arg_outputs("head -123qvqvqzc"), + arg_outputs("head -123qvqvqzc"), // spell-checker:disable-line Ok("head -q -z -c 123".to_owned()) ); //test that bad obsoletes are an error @@ -599,9 +601,9 @@ mod tests { ); } #[test] - fn rbuf_early_exit() { + fn read_early_exit() { let mut empty = std::io::BufReader::new(std::io::Cursor::new(Vec::new())); - assert!(rbuf_n_bytes(&mut empty, 0).is_ok()); - assert!(rbuf_n_lines(&mut empty, 0, false).is_ok()); + assert!(read_n_bytes(&mut empty, 0).is_ok()); + assert!(read_n_lines(&mut empty, 0, false).is_ok()); } } diff --git a/src/uu/head/src/lines.rs b/src/uu/head/src/lines.rs index dcae27bc8..118aba17f 100644 --- a/src/uu/head/src/lines.rs +++ b/src/uu/head/src/lines.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (vars) zline zlines + //! Iterate over zero-terminated lines. use std::io::BufRead; diff --git a/src/uu/head/src/main.rs b/src/uu/head/src/main.rs index fbeb3381e..3e66a50d0 100644 --- a/src/uu/head/src/main.rs +++ b/src/uu/head/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_head); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_head); diff --git a/src/uu/head/src/parse.rs b/src/uu/head/src/parse.rs index b395b330b..50cdfc439 100644 --- a/src/uu/head/src/parse.rs +++ b/src/uu/head/src/parse.rs @@ -7,7 +7,7 @@ pub enum ParseError { Overflow, } /// Parses obsolete syntax -/// head -NUM[kmzv] +/// head -NUM[kmzv] // spell-checker:disable-line pub fn parse_obsolete(src: &str) -> Option, ParseError>> { let mut chars = src.char_indices(); if let Some((_, '-')) = chars.next() { @@ -140,7 +140,7 @@ mod tests { assert_eq!(obsolete("-1mmk"), obsolete_result(&["-c", "1024"])); assert_eq!(obsolete("-1vz"), obsolete_result(&["-v", "-z", "-n", "1"])); assert_eq!( - obsolete("-1vzqvq"), + obsolete("-1vzqvq"), // spell-checker:disable-line obsolete_result(&["-q", "-z", "-n", "1"]) ); assert_eq!(obsolete("-1vzc"), obsolete_result(&["-v", "-z", "-c", "1"])); @@ -155,7 +155,7 @@ mod tests { assert_eq!(obsolete("-5c5"), Some(Err(ParseError::Syntax))); } #[test] - fn test_parse_obsolete_nomatch() { + fn test_parse_obsolete_no_match() { assert_eq!(obsolete("-k"), None); assert_eq!(obsolete("asd"), None); } diff --git a/src/uu/hostid/src/main.rs b/src/uu/hostid/src/main.rs index 12b1178ec..9645ed4a6 100644 --- a/src/uu/hostid/src/main.rs +++ b/src/uu/hostid/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_hostid); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_hostid); diff --git a/src/uu/hostname/src/main.rs b/src/uu/hostname/src/main.rs index a483a8b1a..1d6e6733e 100644 --- a/src/uu/hostname/src/main.rs +++ b/src/uu/hostname/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_hostname); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_hostname); diff --git a/src/uu/id/src/main.rs b/src/uu/id/src/main.rs index 389e2deff..c8f6fe6aa 100644 --- a/src/uu/id/src/main.rs +++ b/src/uu/id/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_id); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_id); diff --git a/src/uu/install/src/main.rs b/src/uu/install/src/main.rs index 289079daf..d296ec4a2 100644 --- a/src/uu/install/src/main.rs +++ b/src/uu/install/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_install); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_install); diff --git a/src/uu/join/src/main.rs b/src/uu/join/src/main.rs index 75be18875..5114252cd 100644 --- a/src/uu/join/src/main.rs +++ b/src/uu/join/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_join); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_join); diff --git a/src/uu/kill/src/main.rs b/src/uu/kill/src/main.rs index c9f639967..91d0a28f0 100644 --- a/src/uu/kill/src/main.rs +++ b/src/uu/kill/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_kill); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_kill); diff --git a/src/uu/link/src/main.rs b/src/uu/link/src/main.rs index d837b4278..ccc565fed 100644 --- a/src/uu/link/src/main.rs +++ b/src/uu/link/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_link); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_link); diff --git a/src/uu/ln/src/ln.rs b/src/uu/ln/src/ln.rs index 04358a415..2a14f3c9c 100644 --- a/src/uu/ln/src/ln.rs +++ b/src/uu/ln/src/ln.rs @@ -371,21 +371,21 @@ fn link_files_in_dir(files: &[PathBuf], target_dir: &Path, settings: &Settings) } fn relative_path<'a>(src: &Path, dst: &Path) -> Result> { - let abssrc = canonicalize(src, CanonicalizeMode::Normal)?; - let absdst = canonicalize(dst, CanonicalizeMode::Normal)?; - let suffix_pos = abssrc + let src_abs = canonicalize(src, CanonicalizeMode::Normal)?; + let dst_abs = canonicalize(dst, CanonicalizeMode::Normal)?; + let suffix_pos = src_abs .components() - .zip(absdst.components()) + .zip(dst_abs.components()) .take_while(|(s, d)| s == d) .count(); - let srciter = abssrc.components().skip(suffix_pos).map(|x| x.as_os_str()); + let src_iter = src_abs.components().skip(suffix_pos).map(|x| x.as_os_str()); - let result: PathBuf = absdst + let result: PathBuf = dst_abs .components() .skip(suffix_pos + 1) .map(|_| OsStr::new("..")) - .chain(srciter) + .chain(src_iter) .collect(); Ok(result.into()) } diff --git a/src/uu/ln/src/main.rs b/src/uu/ln/src/main.rs index de14d10bd..060001972 100644 --- a/src/uu/ln/src/main.rs +++ b/src/uu/ln/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_ln); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_ln); diff --git a/src/uu/logname/src/main.rs b/src/uu/logname/src/main.rs index 48a4063f1..f9cf6160e 100644 --- a/src/uu/logname/src/main.rs +++ b/src/uu/logname/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_logname); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_logname); diff --git a/src/uu/ls/BENCHMARKING.md b/src/uu/ls/BENCHMARKING.md index b009b703a..6bc157805 100644 --- a/src/uu/ls/BENCHMARKING.md +++ b/src/uu/ls/BENCHMARKING.md @@ -1,7 +1,7 @@ # Benchmarking ls ls majorly involves fetching a lot of details (depending upon what details are requested, eg. time/date, inode details, etc) for each path using system calls. Ideally, any system call should be done only once for each of the paths - not adhering to this principle leads to a lot of system call overhead multiplying and bubbling up, especially for recursive ls, therefore it is important to always benchmark multiple scenarios. -This is an overwiew over what was benchmarked, and if you make changes to `ls`, you are encouraged to check +This is an overview over what was benchmarked, and if you make changes to `ls`, you are encouraged to check how performance was affected for the workloads listed below. Feel free to add other workloads to the list that we should improve / make sure not to regress. @@ -55,5 +55,5 @@ However, if the `-R` option is given, the output becomes pretty much useless due #!/bin/bash cargo build --release --no-default-features --features ls perf record target/release/coreutils ls "$@" -perf script | uniq | inferno-collapse-perf | inferno-flamegraph > flamegraph.svg -``` \ No newline at end of file +perf script | uniq | inferno-collapse-perf | inferno-flamegraph > flamegraph.svg +``` diff --git a/src/uu/ls/src/ls.rs b/src/uu/ls/src/ls.rs index 5846cb0aa..28ab13c71 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -60,7 +60,7 @@ fn get_usage() -> String { pub mod options { pub mod format { - pub static ONELINE: &str = "1"; + pub static ONE_LINE: &str = "1"; pub static LONG: &str = "long"; pub static COLUMNS: &str = "C"; pub static ACROSS: &str = "x"; @@ -248,7 +248,7 @@ impl Config { // -og should hide both owner and group. Furthermore, they are not // reset if -l or --format=long is used. So these should just show the // group: -gl or "-g --format=long". Finally, they are also not reset - // when switching to a different format option inbetween like this: + // when switching to a different format option in-between like this: // -ogCl or "-og --format=vertical --format=long". // // -1 has a similar issue: it does nothing if the format is long. This @@ -275,7 +275,7 @@ impl Config { .any(|i| i >= idx) { format = Format::Long; - } else if let Some(mut indices) = options.indices_of(options::format::ONELINE) { + } else if let Some(mut indices) = options.indices_of(options::format::ONE_LINE) { if indices.any(|i| i > idx) { format = Format::OneLine; } @@ -636,8 +636,8 @@ pub fn uumain(args: impl uucore::Args) -> i32 { // ls -1g1 // even though `ls -11` and `ls -1 -g -1` work. .arg( - Arg::with_name(options::format::ONELINE) - .short(options::format::ONELINE) + Arg::with_name(options::format::ONE_LINE) + .short(options::format::ONE_LINE) .help("List one file per line.") .multiple(true) ) @@ -785,6 +785,8 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .long(options::HIDE) .takes_value(true) .multiple(true) + .value_name("PATTERN") + .help("do not list implied entries matching shell PATTERN (overridden by -a or -A)") ) .arg( Arg::with_name(options::IGNORE) @@ -792,6 +794,8 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .long(options::IGNORE) .takes_value(true) .multiple(true) + .value_name("PATTERN") + .help("do not list implied entries matching shell PATTERN") ) .arg( Arg::with_name(options::IGNORE_BACKUPS) @@ -1130,7 +1134,7 @@ impl PathData { let display_name = if let Some(name) = file_name { name } else { - let display_osstr = if command_line { + let display_os_str = if command_line { p_buf.as_os_str() } else { p_buf @@ -1138,7 +1142,7 @@ impl PathData { .unwrap_or_else(|| p_buf.iter().next_back().unwrap()) }; - display_osstr.to_string_lossy().into_owned() + display_os_str.to_string_lossy().into_owned() }; let must_dereference = match &config.dereference { Dereference::All => true, @@ -1624,6 +1628,7 @@ fn display_date(metadata: &Metadata, config: &Config) -> String { TimeStyle::Locale => { let fmt = if recent { "%b %e %H:%M" } else { "%b %e %Y" }; + // spell-checker:ignore (word) datetime //In this version of chrono translating can be done //The function is chrono::datetime::DateTime::format_localized //However it's currently still hard to get the current pure-rust-locale @@ -1678,7 +1683,7 @@ fn display_size_or_rdev(metadata: &Metadata, config: &Config) -> String { } fn display_size(size: u64, config: &Config) -> String { - // NOTE: The human-readable behaviour deviates from the GNU ls. + // NOTE: The human-readable behavior deviates from the GNU ls. // The GNU ls uses binary prefixes by default. match config.size_format { SizeFormat::Binary => format_prefixed(NumberPrefix::binary(size as f64)), @@ -1692,7 +1697,7 @@ fn file_is_executable(md: &Metadata) -> bool { // Mode always returns u32, but the flags might not be, based on the platform // e.g. linux has u32, mac has u16. // S_IXUSR -> user has execute permission - // S_IXGRP -> group has execute persmission + // S_IXGRP -> group has execute permission // S_IXOTH -> other users have execute permission md.mode() & ((S_IXUSR | S_IXGRP | S_IXOTH) as u32) != 0 } diff --git a/src/uu/ls/src/main.rs b/src/uu/ls/src/main.rs index f45314577..d867c3843 100644 --- a/src/uu/ls/src/main.rs +++ b/src/uu/ls/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_ls); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_ls); diff --git a/src/uu/ls/src/quoting_style.rs b/src/uu/ls/src/quoting_style.rs index 01bffa7ec..f9ba55f7b 100644 --- a/src/uu/ls/src/quoting_style.rs +++ b/src/uu/ls/src/quoting_style.rs @@ -304,6 +304,8 @@ pub(super) fn escape_name(name: &str, style: &QuotingStyle) -> String { #[cfg(test)] mod tests { + // spell-checker:ignore (tests/words) one\'two one'two + use crate::quoting_style::{escape_name, Quotes, QuotingStyle}; fn get_style(s: &str) -> QuotingStyle { match s { diff --git a/src/uu/ls/src/version_cmp.rs b/src/uu/ls/src/version_cmp.rs index 4cd39f916..e3f7e29e3 100644 --- a/src/uu/ls/src/version_cmp.rs +++ b/src/uu/ls/src/version_cmp.rs @@ -83,7 +83,7 @@ pub(crate) fn version_cmp(a: &Path, b: &Path) -> Ordering { Ordering::Equal => {} x => return x, }, - // Otherise, we compare the options (because None < Some(_)) + // Otherwise, we compare the options (because None < Some(_)) (a_opt, b_opt) => match a_opt.cmp(&b_opt) { // If they are completely equal except for leading zeroes, we use the leading zeroes. Ordering::Equal => return leading_zeroes, @@ -203,6 +203,7 @@ mod tests { ); assert_eq!( + // spell-checker:disable-next-line version_cmp(&PathBuf::from("file1000"), &PathBuf::from("fileapple")), Ordering::Less, "Numbers in the middle of the name are sorted before other characters" diff --git a/src/uu/mkdir/src/main.rs b/src/uu/mkdir/src/main.rs index 3850113b9..fa6855c93 100644 --- a/src/uu/mkdir/src/main.rs +++ b/src/uu/mkdir/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_mkdir); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_mkdir); diff --git a/src/uu/mkfifo/src/main.rs b/src/uu/mkfifo/src/main.rs index 489dc8ffd..3ad5a3bed 100644 --- a/src/uu/mkfifo/src/main.rs +++ b/src/uu/mkfifo/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_mkfifo); // spell-checker:ignore procs uucore mkfifo +uucore_procs::main!(uu_mkfifo); diff --git a/src/uu/mknod/src/main.rs b/src/uu/mknod/src/main.rs index f3878199b..b65a20cd4 100644 --- a/src/uu/mknod/src/main.rs +++ b/src/uu/mknod/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_mknod); // spell-checker:ignore procs uucore mknod +uucore_procs::main!(uu_mknod); diff --git a/src/uu/mknod/src/mknod.rs b/src/uu/mknod/src/mknod.rs index e0cf62024..57bdd3052 100644 --- a/src/uu/mknod/src/mknod.rs +++ b/src/uu/mknod/src/mknod.rs @@ -50,12 +50,12 @@ fn makedev(maj: u64, min: u64) -> dev_t { } #[cfg(windows)] -fn _makenod(file_name: &str, mode: mode_t, dev: dev_t) -> i32 { +fn _mknod(file_name: &str, mode: mode_t, dev: dev_t) -> i32 { panic!("Unsupported for windows platform") } #[cfg(unix)] -fn _makenod(file_name: &str, mode: mode_t, dev: dev_t) -> i32 { +fn _mknod(file_name: &str, mode: mode_t, dev: dev_t) -> i32 { let c_str = CString::new(file_name).expect("Failed to convert to CString"); // the user supplied a mode @@ -158,7 +158,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { eprintln!("Try '{} --help' for more information.", NAME); 1 } else { - _makenod(file_name, S_IFIFO | mode, 0) + _mknod(file_name, S_IFIFO | mode, 0) } } else { match (matches.value_of("major"), matches.value_of("minor")) { @@ -174,10 +174,10 @@ pub fn uumain(args: impl uucore::Args) -> i32 { let dev = makedev(major, minor); if ch == 'b' { // block special file - _makenod(file_name, S_IFBLK | mode, dev) + _mknod(file_name, S_IFBLK | mode, dev) } else if ch == 'c' || ch == 'u' { // char special file - _makenod(file_name, S_IFCHR | mode, dev) + _mknod(file_name, S_IFCHR | mode, dev) } else { unreachable!("{} was validated to be only b, c or u", ch); } diff --git a/src/uu/mknod/src/parsemode.rs b/src/uu/mknod/src/parsemode.rs index 026fc4a56..2767cb303 100644 --- a/src/uu/mknod/src/parsemode.rs +++ b/src/uu/mknod/src/parsemode.rs @@ -1,4 +1,4 @@ -// spell-checker:ignore (ToDO) fperm +// spell-checker:ignore (path) osrelease use libc::{mode_t, S_IRGRP, S_IROTH, S_IRUSR, S_IWGRP, S_IWOTH, S_IWUSR}; diff --git a/src/uu/mktemp/src/main.rs b/src/uu/mktemp/src/main.rs index 217f09372..020284655 100644 --- a/src/uu/mktemp/src/main.rs +++ b/src/uu/mktemp/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_mktemp); // spell-checker:ignore procs uucore mktemp +uucore_procs::main!(uu_mktemp); diff --git a/src/uu/mktemp/src/mktemp.rs b/src/uu/mktemp/src/mktemp.rs index f6c244bf2..f7c87495c 100644 --- a/src/uu/mktemp/src/mktemp.rs +++ b/src/uu/mktemp/src/mktemp.rs @@ -6,7 +6,7 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// spell-checker:ignore (ToDO) tempfile tempdir SUFF TMPDIR tmpname +// spell-checker:ignore (paths) GPGHome #[macro_use] extern crate uucore; @@ -67,10 +67,10 @@ pub fn uumain(args: impl uucore::Args) -> i32 { Arg::with_name(OPT_SUFFIX) .long(OPT_SUFFIX) .help( - "append SUFF to TEMPLATE; SUFF must not contain a path separator. \ + "append SUFFIX to TEMPLATE; SUFFIX must not contain a path separator. \ This option is implied if TEMPLATE does not end with X.", ) - .value_name("SUFF"), + .value_name("SUFFIX"), ) .arg( Arg::with_name(OPT_TMPDIR) diff --git a/src/uu/more/src/main.rs b/src/uu/more/src/main.rs index 1f3137265..15fbf51f9 100644 --- a/src/uu/more/src/main.rs +++ b/src/uu/more/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_more); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_more); diff --git a/src/uu/more/src/more.rs b/src/uu/more/src/more.rs index c4a13aa1b..482c5491d 100644 --- a/src/uu/more/src/more.rs +++ b/src/uu/more/src/more.rs @@ -5,7 +5,7 @@ // * For the full copyright and license information, please view the LICENSE file // * that was distributed with this source code. -// spell-checker:ignore (ToDO) lflag ICANON tcgetattr tcsetattr TCSADRAIN +// spell-checker:ignore (methods) isnt #[macro_use] extern crate uucore; @@ -100,7 +100,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .long(options::LINES) .value_name("number") .takes_value(true) - .help("The number of lines per screenful"), + .help("The number of lines per screen full"), ) .arg( Arg::with_name(options::NUMBER) @@ -135,30 +135,27 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .help("Path to the files to be read"), ) .get_matches_from(args); - + let mut buff = String::new(); - if let Some(filenames) = matches.values_of(options::FILES) { + if let Some(files) = matches.values_of(options::FILES) { let mut stdout = setup_term(); - let length = filenames.len(); - for (idx, fname) in filenames.enumerate() { - let fname = Path::new(fname); - if fname.is_dir() { + let length = files.len(); + for (idx, file) in files.enumerate() { + let file = Path::new(file); + if file.is_dir() { terminal::disable_raw_mode().unwrap(); - show_usage_error!("'{}' is a directory.", fname.display()); + show_usage_error!("'{}' is a directory.", file.display()); return 1; } - if !fname.exists() { + if !file.exists() { terminal::disable_raw_mode().unwrap(); - show_error!( - "cannot open {}: No such file or directory", - fname.display() - ); + show_error!("cannot open {}: No such file or directory", file.display()); return 1; } if length > 1 { - buff.push_str(&MULTI_FILE_TOP_PROMPT.replace("{}", fname.to_str().unwrap())); + buff.push_str(&MULTI_FILE_TOP_PROMPT.replace("{}", file.to_str().unwrap())); } - let mut reader = BufReader::new(File::open(fname).unwrap()); + let mut reader = BufReader::new(File::open(file).unwrap()); reader.read_to_string(&mut buff).unwrap(); let is_last = idx + 1 == length; more(&buff, &mut stdout, is_last); @@ -220,7 +217,7 @@ fn more(buff: &str, mut stdout: &mut Stdout, is_last: bool) { ); // Specifies whether we have reached the end of the file and should - // return on the next keypress. However, we immediately return when + // return on the next key press. However, we immediately return when // this is the last file. let mut to_be_done = false; if lines_left == 0 && is_last { @@ -230,7 +227,7 @@ fn more(buff: &str, mut stdout: &mut Stdout, is_last: bool) { to_be_done = true; } } - + loop { if event::poll(Duration::from_millis(10)).unwrap() { match event::read().unwrap() { @@ -254,7 +251,6 @@ fn more(buff: &str, mut stdout: &mut Stdout, is_last: bool) { modifiers: KeyModifiers::NONE, }) => { upper_mark = upper_mark.saturating_add(rows.saturating_sub(1)); - } Event::Key(KeyEvent { code: KeyCode::Up, @@ -275,7 +271,7 @@ fn more(buff: &str, mut stdout: &mut Stdout, is_last: bool) { if lines_left == 0 { if to_be_done || is_last { - return + return; } to_be_done = true; } diff --git a/src/uu/mv/src/main.rs b/src/uu/mv/src/main.rs index c7e321234..49f7956e8 100644 --- a/src/uu/mv/src/main.rs +++ b/src/uu/mv/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_mv); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_mv); diff --git a/src/uu/nice/src/main.rs b/src/uu/nice/src/main.rs index 25da035aa..039f40d9d 100644 --- a/src/uu/nice/src/main.rs +++ b/src/uu/nice/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_nice); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_nice); diff --git a/src/uu/nl/src/helper.rs b/src/uu/nl/src/helper.rs index e31477c62..562cdeb93 100644 --- a/src/uu/nl/src/helper.rs +++ b/src/uu/nl/src/helper.rs @@ -29,7 +29,7 @@ pub fn parse_options(settings: &mut crate::Settings, opts: &clap::ArgMatches) -> // This vector holds error messages encountered. let mut errs: Vec = vec![]; settings.renumber = !opts.is_present(options::NO_RENUMBER); - match opts.value_of(options::NUMER_SEPARATOR) { + match opts.value_of(options::NUMBER_SEPARATOR) { None => {} Some(val) => { settings.number_separator = val.to_owned(); @@ -118,7 +118,7 @@ pub fn parse_options(settings: &mut crate::Settings, opts: &clap::ArgMatches) -> } } } - match opts.value_of(options::STARTING_LINE_NUMER) { + match opts.value_of(options::STARTING_LINE_NUMBER) { None => {} Some(val) => { let conv: Option = val.parse().ok(); diff --git a/src/uu/nl/src/main.rs b/src/uu/nl/src/main.rs index fac355069..072fad504 100644 --- a/src/uu/nl/src/main.rs +++ b/src/uu/nl/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_nl); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_nl); diff --git a/src/uu/nl/src/nl.rs b/src/uu/nl/src/nl.rs index 7c5f01811..69adbed41 100644 --- a/src/uu/nl/src/nl.rs +++ b/src/uu/nl/src/nl.rs @@ -79,8 +79,8 @@ pub mod options { pub const JOIN_BLANK_LINES: &str = "join-blank-lines"; pub const NUMBER_FORMAT: &str = "number-format"; pub const NO_RENUMBER: &str = "no-renumber"; - pub const NUMER_SEPARATOR: &str = "number-separator"; - pub const STARTING_LINE_NUMER: &str = "starting-line-number"; + pub const NUMBER_SEPARATOR: &str = "number-separator"; + pub const STARTING_LINE_NUMBER: &str = "starting-line-number"; pub const NUMBER_WIDTH: &str = "number-width"; } @@ -150,16 +150,16 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .help("do not reset line numbers at logical pages"), ) .arg( - Arg::with_name(options::NUMER_SEPARATOR) + Arg::with_name(options::NUMBER_SEPARATOR) .short("s") - .long(options::NUMER_SEPARATOR) + .long(options::NUMBER_SEPARATOR) .help("add STRING after (possible) line number") .value_name("STRING"), ) .arg( - Arg::with_name(options::STARTING_LINE_NUMER) + Arg::with_name(options::STARTING_LINE_NUMBER) .short("v") - .long(options::STARTING_LINE_NUMER) + .long(options::STARTING_LINE_NUMBER) .help("first line number on each logical page") .value_name("NUMBER"), ) diff --git a/src/uu/nohup/src/main.rs b/src/uu/nohup/src/main.rs index d46ceb7cb..2007711f6 100644 --- a/src/uu/nohup/src/main.rs +++ b/src/uu/nohup/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_nohup); // spell-checker:ignore procs uucore nohup +uucore_procs::main!(uu_nohup); diff --git a/src/uu/nproc/src/main.rs b/src/uu/nproc/src/main.rs index 7650cce09..356c2101f 100644 --- a/src/uu/nproc/src/main.rs +++ b/src/uu/nproc/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_nproc); // spell-checker:ignore procs uucore nproc +uucore_procs::main!(uu_nproc); diff --git a/src/uu/numfmt/src/main.rs b/src/uu/numfmt/src/main.rs index 084d494f2..f4d991727 100644 --- a/src/uu/numfmt/src/main.rs +++ b/src/uu/numfmt/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_numfmt); // spell-checker:ignore procs uucore numfmt +uucore_procs::main!(uu_numfmt); diff --git a/src/uu/od/src/main.rs b/src/uu/od/src/main.rs index d5e96180c..3f30d15e8 100644 --- a/src/uu/od/src/main.rs +++ b/src/uu/od/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_od); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_od); diff --git a/src/uu/od/src/od.rs b/src/uu/od/src/od.rs index 571ca543d..7359047b2 100644 --- a/src/uu/od/src/od.rs +++ b/src/uu/od/src/od.rs @@ -5,6 +5,7 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (clap) DontDelimitTrailingValues // spell-checker:ignore (ToDO) formatteriteminfo inputdecoder inputoffset mockstream nrofbytes partialreader odfunc multifile exitcode #[macro_use] @@ -455,7 +456,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { ]); let clap_matches = clap_opts - .clone() // Clone to reuse clap_otps to print help + .clone() // Clone to reuse clap_opts to print help .get_matches_from(args.clone()); if clap_matches.is_present(options::VERSION) { diff --git a/src/uu/od/src/prn_char.rs b/src/uu/od/src/prn_char.rs index cbbb370ce..742229dd7 100644 --- a/src/uu/od/src/prn_char.rs +++ b/src/uu/od/src/prn_char.rs @@ -1,5 +1,3 @@ -// spell-checker:ignore (ToDO) CHRS itembytes MUTF - use std::str::from_utf8; use crate::formatteriteminfo::*; @@ -16,7 +14,7 @@ pub static FORMAT_ITEM_C: FormatterItemInfo = FormatterItemInfo { formatter: FormatWriter::MultibyteWriter(format_item_c), }; -static A_CHRS: [&str; 128] = [ +static A_CHARS: [&str; 128] = [ "nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel", "bs", "ht", "nl", "vt", "ff", "cr", "so", "si", "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", "can", "em", "sub", "esc", "fs", "gs", "rs", "us", "sp", "!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", @@ -28,12 +26,12 @@ static A_CHRS: [&str; 128] = [ ]; fn format_item_a(p: u64) -> String { - // itembytes == 1 + // item-bytes == 1 let b = (p & 0x7f) as u8; - format!("{:>4}", A_CHRS.get(b as usize).unwrap_or(&"??")) + format!("{:>4}", A_CHARS.get(b as usize).unwrap_or(&"??")) } -static C_CHRS: [&str; 128] = [ +static C_CHARS: [&str; 128] = [ "\\0", "001", "002", "003", "004", "005", "006", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "016", "017", "020", "021", "022", "023", "024", "025", "026", "027", "030", "031", "032", "033", "034", "035", "036", "037", " ", "!", "\"", "#", "$", "%", "&", "'", "(", ")", @@ -45,11 +43,11 @@ static C_CHRS: [&str; 128] = [ ]; fn format_item_c(bytes: &[u8]) -> String { - // itembytes == 1 + // item-bytes == 1 let b = bytes[0]; if b & 0x80 == 0x00 { - match C_CHRS.get(b as usize) { + match C_CHARS.get(b as usize) { Some(s) => format!("{:>4}", s), None => format!("{:>4}", b), } @@ -86,7 +84,7 @@ pub fn format_ascii_dump(bytes: &[u8]) -> String { result.push('>'); for c in bytes.iter() { if *c >= 0x20 && *c <= 0x7e { - result.push_str(C_CHRS[*c as usize]); + result.push_str(C_CHARS[*c as usize]); } else { result.push('.'); } @@ -136,12 +134,12 @@ fn test_format_item_c() { format_item_c(&[0xf0, 0x9f, 0x92, 0x96, 0x21]) ); - assert_eq!(" 300", format_item_c(&[0xc0, 0x80])); // invalid utf-8 (MUTF-8 null) + assert_eq!(" 300", format_item_c(&[0xc0, 0x80])); // invalid utf-8 (UTF-8 null) assert_eq!(" 301", format_item_c(&[0xc1, 0xa1])); // invalid utf-8 assert_eq!(" 303", format_item_c(&[0xc3, 0xc3])); // invalid utf-8 assert_eq!(" 360", format_item_c(&[0xf0, 0x82, 0x82, 0xac])); // invalid utf-8 (overlong) assert_eq!(" 360", format_item_c(&[0xf0, 0x9f, 0x92])); // invalid utf-8 (missing octet) - assert_eq!(" \u{10FFFD}", format_item_c(&[0xf4, 0x8f, 0xbf, 0xbd])); // largest valid utf-8 + assert_eq!(" \u{10FFFD}", format_item_c(&[0xf4, 0x8f, 0xbf, 0xbd])); // largest valid utf-8 // spell-checker:ignore 10FFFD FFFD assert_eq!(" 364", format_item_c(&[0xf4, 0x90, 0x00, 0x00])); // invalid utf-8 assert_eq!(" 365", format_item_c(&[0xf5, 0x80, 0x80, 0x80])); // invalid utf-8 assert_eq!(" 377", format_item_c(&[0xff])); // invalid utf-8 diff --git a/src/uu/od/src/prn_int.rs b/src/uu/od/src/prn_int.rs index b8397b01b..0946824c1 100644 --- a/src/uu/od/src/prn_int.rs +++ b/src/uu/od/src/prn_int.rs @@ -1,5 +1,3 @@ -// spell-checker:ignore (ToDO) itembytes - use crate::formatteriteminfo::*; /// format string to print octal using `int_writer_unsigned` @@ -60,9 +58,9 @@ macro_rules! int_writer_signed { }; } -/// Extends a signed number in `item` of `itembytes` bytes into a (signed) i64 -fn sign_extend(item: u64, itembytes: usize) -> i64 { - let shift = 64 - itembytes * 8; +/// Extends a signed number in `item` of `item_bytes` bytes into a (signed) i64 +fn sign_extend(item: u64, item_bytes: usize) -> i64 { + let shift = 64 - item_bytes * 8; (item << shift) as i64 >> shift } @@ -89,46 +87,46 @@ int_writer_signed!(FORMAT_ITEM_DEC64S, 8, 21, format_item_dec_s64, DEC!()); // m #[test] fn test_sign_extend() { assert_eq!( - 0xffffffffffffff80u64 as i64, - sign_extend(0x0000000000000080, 1) + 0xffff_ffff_ffff_ff80u64 as i64, + sign_extend(0x0000_0000_0000_0080, 1) ); assert_eq!( - 0xffffffffffff8000u64 as i64, - sign_extend(0x0000000000008000, 2) + 0xffff_ffff_ffff_8000u64 as i64, + sign_extend(0x0000_0000_0000_8000, 2) ); assert_eq!( - 0xffffffffff800000u64 as i64, - sign_extend(0x0000000000800000, 3) + 0xffff_ffff_ff80_0000u64 as i64, + sign_extend(0x0000_0000_0080_0000, 3) ); assert_eq!( - 0xffffffff80000000u64 as i64, - sign_extend(0x0000000080000000, 4) + 0xffff_ffff_8000_0000u64 as i64, + sign_extend(0x0000_0000_8000_0000, 4) ); assert_eq!( - 0xffffff8000000000u64 as i64, - sign_extend(0x0000008000000000, 5) + 0xffff_ff80_0000_0000u64 as i64, + sign_extend(0x0000_0080_0000_0000, 5) ); assert_eq!( - 0xffff800000000000u64 as i64, - sign_extend(0x0000800000000000, 6) + 0xffff_8000_0000_0000u64 as i64, + sign_extend(0x0000_8000_0000_0000, 6) ); assert_eq!( - 0xff80000000000000u64 as i64, - sign_extend(0x0080000000000000, 7) + 0xff80_0000_0000_0000u64 as i64, + sign_extend(0x0080_0000_0000_0000, 7) ); assert_eq!( - 0x8000000000000000u64 as i64, - sign_extend(0x8000000000000000, 8) + 0x8000_0000_0000_0000u64 as i64, + sign_extend(0x8000_0000_0000_0000, 8) ); - assert_eq!(0x000000000000007f, sign_extend(0x000000000000007f, 1)); - assert_eq!(0x0000000000007fff, sign_extend(0x0000000000007fff, 2)); - assert_eq!(0x00000000007fffff, sign_extend(0x00000000007fffff, 3)); - assert_eq!(0x000000007fffffff, sign_extend(0x000000007fffffff, 4)); - assert_eq!(0x0000007fffffffff, sign_extend(0x0000007fffffffff, 5)); - assert_eq!(0x00007fffffffffff, sign_extend(0x00007fffffffffff, 6)); - assert_eq!(0x007fffffffffffff, sign_extend(0x007fffffffffffff, 7)); - assert_eq!(0x7fffffffffffffff, sign_extend(0x7fffffffffffffff, 8)); + assert_eq!(0x0000_0000_0000_007f, sign_extend(0x0000_0000_0000_007f, 1)); + assert_eq!(0x0000_0000_0000_7fff, sign_extend(0x0000_0000_0000_7fff, 2)); + assert_eq!(0x0000_0000_007f_ffff, sign_extend(0x0000_0000_007f_ffff, 3)); + assert_eq!(0x0000_0000_7fff_ffff, sign_extend(0x0000_0000_7fff_ffff, 4)); + assert_eq!(0x0000_007f_ffff_ffff, sign_extend(0x0000_007f_ffff_ffff, 5)); + assert_eq!(0x0000_7fff_ffff_ffff, sign_extend(0x0000_7fff_ffff_ffff, 6)); + assert_eq!(0x007f_ffff_ffff_ffff, sign_extend(0x007f_ffff_ffff_ffff, 7)); + assert_eq!(0x7fff_ffff_ffff_ffff, sign_extend(0x7fff_ffff_ffff_ffff, 8)); } #[test] @@ -138,11 +136,11 @@ fn test_format_item_oct() { assert_eq!(" 000000", format_item_oct16(0)); assert_eq!(" 177777", format_item_oct16(0xffff)); assert_eq!(" 00000000000", format_item_oct32(0)); - assert_eq!(" 37777777777", format_item_oct32(0xffffffff)); + assert_eq!(" 37777777777", format_item_oct32(0xffff_ffff)); assert_eq!(" 0000000000000000000000", format_item_oct64(0)); assert_eq!( " 1777777777777777777777", - format_item_oct64(0xffffffffffffffff) + format_item_oct64(0xffff_ffff_ffff_ffff) ); } @@ -153,9 +151,12 @@ fn test_format_item_hex() { assert_eq!(" 0000", format_item_hex16(0)); assert_eq!(" ffff", format_item_hex16(0xffff)); assert_eq!(" 00000000", format_item_hex32(0)); - assert_eq!(" ffffffff", format_item_hex32(0xffffffff)); + assert_eq!(" ffffffff", format_item_hex32(0xffff_ffff)); assert_eq!(" 0000000000000000", format_item_hex64(0)); - assert_eq!(" ffffffffffffffff", format_item_hex64(0xffffffffffffffff)); + assert_eq!( + " ffffffffffffffff", + format_item_hex64(0xffff_ffff_ffff_ffff) + ); } #[test] @@ -165,11 +166,11 @@ fn test_format_item_dec_u() { assert_eq!(" 0", format_item_dec_u16(0)); assert_eq!(" 65535", format_item_dec_u16(0xffff)); assert_eq!(" 0", format_item_dec_u32(0)); - assert_eq!(" 4294967295", format_item_dec_u32(0xffffffff)); + assert_eq!(" 4294967295", format_item_dec_u32(0xffff_ffff)); assert_eq!(" 0", format_item_dec_u64(0)); assert_eq!( " 18446744073709551615", - format_item_dec_u64(0xffffffffffffffff) + format_item_dec_u64(0xffff_ffff_ffff_ffff) ); } @@ -182,15 +183,15 @@ fn test_format_item_dec_s() { assert_eq!(" 32767", format_item_dec_s16(0x7fff)); assert_eq!(" -32768", format_item_dec_s16(0x8000)); assert_eq!(" 0", format_item_dec_s32(0)); - assert_eq!(" 2147483647", format_item_dec_s32(0x7fffffff)); - assert_eq!(" -2147483648", format_item_dec_s32(0x80000000)); + assert_eq!(" 2147483647", format_item_dec_s32(0x7fff_ffff)); + assert_eq!(" -2147483648", format_item_dec_s32(0x8000_0000)); assert_eq!(" 0", format_item_dec_s64(0)); assert_eq!( " 9223372036854775807", - format_item_dec_s64(0x7fffffffffffffff) + format_item_dec_s64(0x7fff_ffff_ffff_ffff) ); assert_eq!( " -9223372036854775808", - format_item_dec_s64(0x8000000000000000) + format_item_dec_s64(0x8000_0000_0000_0000) ); } diff --git a/src/uu/paste/src/main.rs b/src/uu/paste/src/main.rs index bb9b25a68..1d4458b9e 100644 --- a/src/uu/paste/src/main.rs +++ b/src/uu/paste/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_paste); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_paste); diff --git a/src/uu/pathchk/src/main.rs b/src/uu/pathchk/src/main.rs index e16353196..2b7c3b3ee 100644 --- a/src/uu/pathchk/src/main.rs +++ b/src/uu/pathchk/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_pathchk); // spell-checker:ignore procs uucore pathchk +uucore_procs::main!(uu_pathchk); diff --git a/src/uu/pinky/src/main.rs b/src/uu/pinky/src/main.rs index 1bf1e618a..5414c42cc 100644 --- a/src/uu/pinky/src/main.rs +++ b/src/uu/pinky/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_pinky); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_pinky); diff --git a/src/uu/pr/Cargo.toml b/src/uu/pr/Cargo.toml new file mode 100644 index 000000000..6d9ec2304 --- /dev/null +++ b/src/uu/pr/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "uu_pr" +version = "0.0.6" +authors = ["uutils developers"] +license = "MIT" +description = "pr ~ (uutils) convert text files for printing" + +homepage = "https://github.com/uutils/coreutils" +repository = "https://github.com/uutils/coreutils/tree/master/src/uu/pr" +keywords = ["coreutils", "uutils", "cross-platform", "cli", "utility"] +categories = ["command-line-utilities"] +edition = "2018" + +[lib] +path = "src/pr.rs" + +[dependencies] +uucore = { version=">=0.0.7", package="uucore", path="../../uucore", features=["utmpx", "entries"] } +uucore_procs = { version=">=0.0.5", package="uucore_procs", path="../../uucore_procs" } +getopts = "0.2.21" +time = "0.1.41" +# A higher version would cause a conflict with time +chrono = "0.4.19" +quick-error = "2.0.1" +itertools = "0.10" +regex = "1.0" + +[[bin]] +name = "pr" +path = "src/main.rs" diff --git a/src/uu/pr/src/main.rs b/src/uu/pr/src/main.rs new file mode 100644 index 000000000..893145c3e --- /dev/null +++ b/src/uu/pr/src/main.rs @@ -0,0 +1 @@ +uucore_procs::main!(uu_pr); // spell-checker:ignore procs uucore diff --git a/src/uu/pr/src/pr.rs b/src/uu/pr/src/pr.rs new file mode 100644 index 000000000..486cedc00 --- /dev/null +++ b/src/uu/pr/src/pr.rs @@ -0,0 +1,1289 @@ +#![crate_name = "uu_pr"] + +// This file is part of the uutils coreutils package. +// +// For the full copyright and license information, please view the LICENSE file +// that was distributed with this source code. +// + +// spell-checker:ignore (ToDO) adFfmprt, kmerge + +#[macro_use] +extern crate quick_error; + +use chrono::offset::Local; +use chrono::DateTime; +use getopts::Matches; +use getopts::{HasArg, Occur}; +use itertools::Itertools; +use quick_error::ResultExt; +use regex::Regex; +use std::convert::From; +use std::fs::{metadata, File}; +use std::io::{stdin, stdout, BufRead, BufReader, Lines, Read, Stdout, Write}; +#[cfg(unix)] +use std::os::unix::fs::FileTypeExt; + +type IOError = std::io::Error; + +const NAME: &str = "pr"; +const VERSION: &str = env!("CARGO_PKG_VERSION"); +const TAB: char = '\t'; +const LINES_PER_PAGE: usize = 66; +const LINES_PER_PAGE_FOR_FORM_FEED: usize = 63; +const HEADER_LINES_PER_PAGE: usize = 5; +const TRAILER_LINES_PER_PAGE: usize = 5; +const FILE_STDIN: &str = "-"; +const READ_BUFFER_SIZE: usize = 1024 * 64; +const DEFAULT_COLUMN_WIDTH: usize = 72; +const DEFAULT_COLUMN_WIDTH_WITH_S_OPTION: usize = 512; +const DEFAULT_COLUMN_SEPARATOR: &char = &TAB; +const FF: u8 = 0x0C_u8; + +mod options { + pub const STRING_HEADER_OPTION: &str = "h"; + pub const DOUBLE_SPACE_OPTION: &str = "d"; + pub const NUMBERING_MODE_OPTION: &str = "n"; + pub const FIRST_LINE_NUMBER_OPTION: &str = "N"; + pub const PAGE_RANGE_OPTION: &str = "pages"; + pub const NO_HEADER_TRAILER_OPTION: &str = "t"; + pub const PAGE_LENGTH_OPTION: &str = "l"; + pub const SUPPRESS_PRINTING_ERROR: &str = "r"; + pub const FORM_FEED_OPTION: &str = "F"; + pub const FORM_FEED_OPTION_SMALL: &str = "f"; + pub const COLUMN_WIDTH_OPTION: &str = "w"; + pub const PAGE_WIDTH_OPTION: &str = "W"; + pub const ACROSS_OPTION: &str = "a"; + pub const COLUMN_OPTION: &str = "column"; + pub const COLUMN_CHAR_SEPARATOR_OPTION: &str = "s"; + pub const COLUMN_STRING_SEPARATOR_OPTION: &str = "S"; + pub const MERGE_FILES_PRINT: &str = "m"; + pub const OFFSET_SPACES_OPTION: &str = "o"; + pub const JOIN_LINES_OPTION: &str = "J"; +} + +struct OutputOptions { + /// Line numbering mode + number: Option, + header: String, + double_space: bool, + line_separator: String, + content_line_separator: String, + last_modified_time: String, + start_page: usize, + end_page: Option, + display_header_and_trailer: bool, + content_lines_per_page: usize, + page_separator_char: String, + column_mode_options: Option, + merge_files_print: Option, + offset_spaces: String, + form_feed_used: bool, + join_lines: bool, + col_sep_for_printing: String, + line_width: Option, +} + +struct FileLine { + file_id: usize, + line_number: usize, + page_number: usize, + group_key: usize, + line_content: Result, + form_feeds_after: usize, +} + +struct ColumnModeOptions { + width: usize, + columns: usize, + column_separator: String, + across_mode: bool, +} + +/// Line numbering mode +struct NumberingMode { + width: usize, + separator: String, + first_number: usize, +} + +impl Default for NumberingMode { + fn default() -> NumberingMode { + NumberingMode { + width: 5, + separator: TAB.to_string(), + first_number: 1, + } + } +} + +impl Default for FileLine { + fn default() -> FileLine { + FileLine { + file_id: 0, + line_number: 0, + page_number: 0, + group_key: 0, + line_content: Ok(String::new()), + form_feeds_after: 0, + } + } +} + +impl From for PrError { + fn from(err: IOError) -> Self { + PrError::EncounteredErrors(err.to_string()) + } +} + +quick_error! { + #[derive(Debug)] + enum PrError { + Input(err: IOError, path: String) { + context(path: &'a str, err: IOError) -> (err, path.to_owned()) + display("pr: Reading from input {0} gave error", path) + source(err) + } + + UnknownFiletype(path: String) { + display("pr: {0}: unknown filetype", path) + } + + EncounteredErrors(msg: String) { + display("pr: {0}", msg) + } + + IsDirectory(path: String) { + display("pr: {0}: Is a directory", path) + } + + IsSocket(path: String) { + display("pr: cannot open {}, Operation not supported on socket", path) + } + + NotExists(path: String) { + display("pr: cannot open {}, No such file or directory", path) + } + } +} + +pub fn uumain(args: impl uucore::Args) -> i32 { + let args = args + .collect_str(uucore::InvalidEncodingHandling::Ignore) + .accept_any(); + let mut opts = getopts::Options::new(); + + opts.opt( + "", + options::PAGE_RANGE_OPTION, + "Begin and stop printing with page FIRST_PAGE[:LAST_PAGE]", + "FIRST_PAGE[:LAST_PAGE]", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::STRING_HEADER_OPTION, + "header", + "Use the string header to replace the file name \ + in the header line.", + "STRING", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::DOUBLE_SPACE_OPTION, + "double-space", + "Produce output that is double spaced. An extra character is output following every + found in the input.", + "", + HasArg::No, + Occur::Optional, + ); + + opts.opt( + options::NUMBERING_MODE_OPTION, + "number-lines", + "Provide width digit line numbering. The default for width, if not specified, is 5. The number occupies + the first width column positions of each text column or each line of -m output. If char (any non-digit + character) is given, it is appended to the line number to separate it from whatever follows. The default + for char is a . Line numbers longer than width columns are truncated.", + "[char][width]", + HasArg::Maybe, + Occur::Optional, + ); + + opts.opt( + options::FIRST_LINE_NUMBER_OPTION, + "first-line-number", + "start counting with NUMBER at 1st line of first page printed", + "NUMBER", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::NO_HEADER_TRAILER_OPTION, + "omit-header", + "Write neither the five-line identifying header nor the five-line trailer usually supplied for each page. Quit + writing after the last line of each file without spacing to the end of the page.", + "", + HasArg::No, + Occur::Optional, + ); + + opts.opt( + options::PAGE_LENGTH_OPTION, + "length", + "Override the 66-line default (default number of lines of text 56, and with -F 63) and reset the page length to lines. If lines is not greater than the sum of both + the header and trailer depths (in lines), the pr utility shall suppress both the header and trailer, as if the + -t option were in effect. ", + "lines", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::SUPPRESS_PRINTING_ERROR, + "no-file-warnings", + "omit warning when a file cannot be opened", + "", + HasArg::No, + Occur::Optional, + ); + + opts.opt( + options::FORM_FEED_OPTION, + "form-feed", + "Use a for new pages, instead of the default behavior that uses a sequence of s.", + "", + HasArg::No, + Occur::Optional, + ); + opts.opt( + options::FORM_FEED_OPTION_SMALL, + "form-feed", + "Same as -F but pause before beginning the first page if standard output is a + terminal.", + "", + HasArg::No, + Occur::Optional, + ); + + opts.opt( + "", + options::COLUMN_OPTION, + "Produce multi-column output that is arranged in column columns (the default shall be 1) and is written down each + column in the order in which the text is received from the input file. This option should not be used with -m. + The options -e and -i shall be assumed for multiple text-column output. Whether or not text columns are produced + with identical vertical lengths is unspecified, but a text column shall never exceed the length of the + page (see the -l option). When used with -t, use the minimum number of lines to write the output.", + "[column]", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::COLUMN_WIDTH_OPTION, + "width", + "Set the width of the line to width column positions for multiple text-column output only. If the -w option is + not specified and the -s option is not specified, the default width shall be 72. If the -w option is not specified + and the -s option is specified, the default width shall be 512.", + "[width]", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::PAGE_WIDTH_OPTION, + "page-width", + "set page width to PAGE_WIDTH (72) characters always, + truncate lines, except -J option is set, no interference + with -S or -s", + "[width]", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::ACROSS_OPTION, + "across", + "Modify the effect of the - column option so that the columns are filled across the page in a round-robin order + (for example, when column is 2, the first input line heads column 1, the second heads column 2, the third is the + second line in column 1, and so on).", + "", + HasArg::No, + Occur::Optional, + ); + + opts.opt( + options::COLUMN_CHAR_SEPARATOR_OPTION, + "separator", + "Separate text columns by the single character char instead of by the appropriate number of s + (default for char is the character).", + "char", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::COLUMN_STRING_SEPARATOR_OPTION, + "sep-string", + "separate columns by STRING, + without -S: Default separator with -J and + otherwise (same as -S\" \"), no effect on column options", + "string", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::MERGE_FILES_PRINT, + "merge", + "Merge files. Standard output shall be formatted so the pr utility writes one line from each file specified by a + file operand, side by side into text columns of equal fixed widths, in terms of the number of column positions. + Implementations shall support merging of at least nine file operands.", + "", + HasArg::No, + Occur::Optional, + ); + + opts.opt( + options::OFFSET_SPACES_OPTION, + "indent", + "Each line of output shall be preceded by offset s. If the -o option is not specified, the default offset + shall be zero. The space taken is in addition to the output line width (see the -w option below).", + "offset", + HasArg::Yes, + Occur::Optional, + ); + + opts.opt( + options::JOIN_LINES_OPTION, + "join-lines", + "merge full lines, turns off -W line truncation, no column + alignment, --sep-string[=STRING] sets separators", + "offset", + HasArg::No, + Occur::Optional, + ); + + opts.optflag("", "help", "display this help and exit"); + opts.optflag("V", "version", "output version information and exit"); + + let opt_args = recreate_arguments(&args); + + let matches = match opts.parse(&opt_args[1..]) { + Ok(m) => m, + Err(e) => panic!("Invalid options\n{}", e), + }; + + if matches.opt_present("version") { + println!("{} {}", NAME, VERSION); + return 0; + } + + let mut files = matches.free.clone(); + if files.is_empty() { + files.insert(0, FILE_STDIN.to_owned()); + } + + if matches.opt_present("help") { + return print_usage(&mut opts, &matches); + } + + let file_groups: Vec<_> = if matches.opt_present(options::MERGE_FILES_PRINT) { + vec![files] + } else { + files.into_iter().map(|i| vec![i]).collect() + }; + + for file_group in file_groups { + let result_options = build_options(&matches, &file_group, args.join(" ")); + + if result_options.is_err() { + print_error(&matches, result_options.err().unwrap()); + return 1; + } + + let options = &result_options.unwrap(); + + let cmd_result = if file_group.len() == 1 { + pr(&file_group.get(0).unwrap(), options) + } else { + mpr(&file_group, options) + }; + + let status = match cmd_result { + Err(error) => { + print_error(&matches, error); + 1 + } + _ => 0, + }; + if status != 0 { + return status; + } + } + + 0 +} + +/// Returns re-written arguments which are passed to the program. +/// Removes -column and +page option as getopts cannot parse things like -3 etc +/// # Arguments +/// * `args` - Command line arguments +fn recreate_arguments(args: &[String]) -> Vec { + let column_page_option = Regex::new(r"^[-+]\d+.*").unwrap(); + let num_regex = Regex::new(r"(.\d+)|(\d+)|^[^-]$").unwrap(); + //let a_file: Regex = Regex::new(r"^[^-+].*").unwrap(); + let n_regex = Regex::new(r"^-n\s*$").unwrap(); + let mut arguments = args.to_owned(); + let num_option = args.iter().find_position(|x| n_regex.is_match(x.trim())); + if let Some((pos, _value)) = num_option { + let num_val_opt = args.get(pos + 1); + if num_val_opt.is_some() && !num_regex.is_match(num_val_opt.unwrap()) { + let could_be_file = arguments.remove(pos + 1); + arguments.insert(pos + 1, format!("{}", NumberingMode::default().width)); + arguments.insert(pos + 2, could_be_file); + } + } + + arguments + .into_iter() + .filter(|i| !column_page_option.is_match(i)) + .collect() +} + +fn print_error(matches: &Matches, err: PrError) { + if !matches.opt_present(options::SUPPRESS_PRINTING_ERROR) { + eprintln!("{}", err); + } +} + +fn print_usage(opts: &mut getopts::Options, matches: &Matches) -> i32 { + println!("{} {} -- print files", NAME, VERSION); + println!(); + println!( + "Usage: {} [+page] [-column] [-adFfmprt] [[-e] [char] [gap]] + [-L locale] [-h header] [[-i] [char] [gap]] + [-l lines] [-o offset] [[-s] [char]] [[-n] [char] + [width]] [-w width] [-] [file ...].", + NAME + ); + println!(); + let usage: &str = "The pr utility is a printing and pagination filter + for text files. When multiple input files are specified, + each is read, formatted, and written to standard + output. By default, the input is separated + into 66-line pages, each with + + o A 5-line header with the page number, date, + time, and the pathname of the file. + + o A 5-line trailer consisting of blank lines. + + If standard output is associated with a terminal, + diagnostic messages are suppressed until the pr + utility has completed processing. + + When multiple column output is specified, text columns + are of equal width. By default text columns + are separated by at least one . Input lines + that do not fit into a text column are truncated. + Lines are not truncated under single column output."; + println!("{}", opts.usage(usage)); + println!(" +page \t\tBegin output at page number page of the formatted input."); + println!( + " -column \t\tProduce multi-column output. Refer --{}", + options::COLUMN_OPTION + ); + if matches.free.is_empty() { + return 1; + } + + 0 +} + +fn parse_usize(matches: &Matches, opt: &str) -> Option> { + let from_parse_error_to_pr_error = |value_to_parse: (String, String)| { + let i = value_to_parse.0; + let option = value_to_parse.1; + i.parse().map_err(|_e| { + PrError::EncounteredErrors(format!("invalid {} argument '{}'", option, i)) + }) + }; + matches + .opt_str(opt) + .map(|i| (i, format!("-{}", opt))) + .map(from_parse_error_to_pr_error) +} + +fn build_options( + matches: &Matches, + paths: &[String], + free_args: String, +) -> Result { + let form_feed_used = matches.opt_present(options::FORM_FEED_OPTION) + || matches.opt_present(options::FORM_FEED_OPTION_SMALL); + + let is_merge_mode = matches.opt_present(options::MERGE_FILES_PRINT); + + if is_merge_mode && matches.opt_present(options::COLUMN_OPTION) { + let err_msg = String::from("cannot specify number of columns when printing in parallel"); + return Err(PrError::EncounteredErrors(err_msg)); + } + + if is_merge_mode && matches.opt_present(options::ACROSS_OPTION) { + let err_msg = String::from("cannot specify both printing across and printing in parallel"); + return Err(PrError::EncounteredErrors(err_msg)); + } + + let merge_files_print = if matches.opt_present(options::MERGE_FILES_PRINT) { + Some(paths.len()) + } else { + None + }; + + let header = matches.opt_str(options::STRING_HEADER_OPTION).unwrap_or( + if is_merge_mode || paths[0] == FILE_STDIN { + String::new() + } else { + paths[0].to_string() + }, + ); + + let default_first_number = NumberingMode::default().first_number; + let first_number = parse_usize(matches, options::FIRST_LINE_NUMBER_OPTION) + .unwrap_or(Ok(default_first_number))?; + + let number = matches + .opt_str(options::NUMBERING_MODE_OPTION) + .map(|i| { + let parse_result = i.parse::(); + + let separator = if parse_result.is_err() { + i[0..1].to_string() + } else { + NumberingMode::default().separator + }; + + let width = match parse_result { + Ok(res) => res, + Err(_) => i[1..] + .parse::() + .unwrap_or(NumberingMode::default().width), + }; + + NumberingMode { + width, + separator, + first_number, + } + }) + .or_else(|| { + if matches.opt_present(options::NUMBERING_MODE_OPTION) { + Some(NumberingMode::default()) + } else { + None + } + }); + + let double_space = matches.opt_present(options::DOUBLE_SPACE_OPTION); + + let content_line_separator = if double_space { + "\n".repeat(2) + } else { + "\n".to_string() + }; + + let line_separator = "\n".to_string(); + + let last_modified_time = if is_merge_mode || paths[0].eq(FILE_STDIN) { + let date_time = Local::now(); + date_time.format("%b %d %H:%M %Y").to_string() + } else { + file_last_modified_time(paths.get(0).unwrap()) + }; + + // +page option is less priority than --pages + let page_plus_re = Regex::new(r"\s*\+(\d+:*\d*)\s*").unwrap(); + let start_page_in_plus_option = match page_plus_re.captures(&free_args).map(|i| { + let unparsed_num = i.get(1).unwrap().as_str().trim(); + let x: Vec<_> = unparsed_num.split(':').collect(); + x[0].to_string().parse::().map_err(|_e| { + PrError::EncounteredErrors(format!("invalid {} argument '{}'", "+", unparsed_num)) + }) + }) { + Some(res) => res?, + None => 1, + }; + + let end_page_in_plus_option = match page_plus_re + .captures(&free_args) + .map(|i| i.get(1).unwrap().as_str().trim()) + .filter(|i| i.contains(':')) + .map(|unparsed_num| { + let x: Vec<_> = unparsed_num.split(':').collect(); + x[1].to_string().parse::().map_err(|_e| { + PrError::EncounteredErrors(format!("invalid {} argument '{}'", "+", unparsed_num)) + }) + }) { + Some(res) => Some(res?), + None => None, + }; + + let invalid_pages_map = |i: String| { + let unparsed_value = matches.opt_str(options::PAGE_RANGE_OPTION).unwrap(); + i.parse::().map_err(|_e| { + PrError::EncounteredErrors(format!("invalid --pages argument '{}'", unparsed_value)) + }) + }; + + let start_page = match matches + .opt_str(options::PAGE_RANGE_OPTION) + .map(|i| { + let x: Vec<_> = i.split(':').collect(); + x[0].to_string() + }) + .map(invalid_pages_map) + { + Some(res) => res?, + None => start_page_in_plus_option, + }; + + let end_page = match matches + .opt_str(options::PAGE_RANGE_OPTION) + .filter(|i| i.contains(':')) + .map(|i| { + let x: Vec<_> = i.split(':').collect(); + x[1].to_string() + }) + .map(invalid_pages_map) + { + Some(res) => Some(res?), + None => end_page_in_plus_option, + }; + + if end_page.is_some() && start_page > end_page.unwrap() { + return Err(PrError::EncounteredErrors(format!( + "invalid --pages argument '{}:{}'", + start_page, + end_page.unwrap() + ))); + } + + let default_lines_per_page = if form_feed_used { + LINES_PER_PAGE_FOR_FORM_FEED + } else { + LINES_PER_PAGE + }; + + let page_length = + parse_usize(matches, options::PAGE_LENGTH_OPTION).unwrap_or(Ok(default_lines_per_page))?; + + let page_length_le_ht = page_length < (HEADER_LINES_PER_PAGE + TRAILER_LINES_PER_PAGE); + + let display_header_and_trailer = + !(page_length_le_ht) && !matches.opt_present(options::NO_HEADER_TRAILER_OPTION); + + let content_lines_per_page = if page_length_le_ht { + page_length + } else { + page_length - (HEADER_LINES_PER_PAGE + TRAILER_LINES_PER_PAGE) + }; + + let page_separator_char = if matches.opt_present(options::FORM_FEED_OPTION) { + let bytes = vec![FF]; + String::from_utf8(bytes).unwrap() + } else { + "\n".to_string() + }; + + let across_mode = matches.opt_present(options::ACROSS_OPTION); + + let column_separator = match matches.opt_str(options::COLUMN_STRING_SEPARATOR_OPTION) { + Some(x) => Some(x), + None => matches.opt_str(options::COLUMN_CHAR_SEPARATOR_OPTION), + } + .unwrap_or_else(|| DEFAULT_COLUMN_SEPARATOR.to_string()); + + let default_column_width = if matches.opt_present(options::COLUMN_WIDTH_OPTION) + && matches.opt_present(options::COLUMN_CHAR_SEPARATOR_OPTION) + { + DEFAULT_COLUMN_WIDTH_WITH_S_OPTION + } else { + DEFAULT_COLUMN_WIDTH + }; + + let column_width = + parse_usize(matches, options::COLUMN_WIDTH_OPTION).unwrap_or(Ok(default_column_width))?; + + let page_width = if matches.opt_present(options::JOIN_LINES_OPTION) { + None + } else { + match parse_usize(matches, options::PAGE_WIDTH_OPTION) { + Some(res) => Some(res?), + None => None, + } + }; + + let re_col = Regex::new(r"\s*-(\d+)\s*").unwrap(); + + let start_column_option = match re_col.captures(&free_args).map(|i| { + let unparsed_num = i.get(1).unwrap().as_str().trim(); + unparsed_num.parse::().map_err(|_e| { + PrError::EncounteredErrors(format!("invalid {} argument '{}'", "-", unparsed_num)) + }) + }) { + Some(res) => Some(res?), + None => None, + }; + + // --column has more priority than -column + + let column_option_value = match parse_usize(matches, options::COLUMN_OPTION) { + Some(res) => Some(res?), + None => start_column_option, + }; + + let column_mode_options = column_option_value.map(|columns| ColumnModeOptions { + columns, + width: column_width, + column_separator, + across_mode, + }); + + let offset_spaces = + " ".repeat(parse_usize(matches, options::OFFSET_SPACES_OPTION).unwrap_or(Ok(0))?); + let join_lines = matches.opt_present(options::JOIN_LINES_OPTION); + + let col_sep_for_printing = column_mode_options + .as_ref() + .map(|i| i.column_separator.clone()) + .unwrap_or_else(|| { + merge_files_print + .map(|_k| DEFAULT_COLUMN_SEPARATOR.to_string()) + .unwrap_or_default() + }); + + let columns_to_print = merge_files_print + .unwrap_or_else(|| column_mode_options.as_ref().map(|i| i.columns).unwrap_or(1)); + + let line_width = if join_lines { + None + } else if columns_to_print > 1 { + Some( + column_mode_options + .as_ref() + .map(|i| i.width) + .unwrap_or(DEFAULT_COLUMN_WIDTH), + ) + } else { + page_width + }; + + Ok(OutputOptions { + number, + header, + double_space, + line_separator, + content_line_separator, + last_modified_time, + start_page, + end_page, + display_header_and_trailer, + content_lines_per_page, + page_separator_char, + column_mode_options, + merge_files_print, + offset_spaces, + form_feed_used, + join_lines, + col_sep_for_printing, + line_width, + }) +} + +fn open(path: &str) -> Result, PrError> { + if path == FILE_STDIN { + let stdin = stdin(); + return Ok(Box::new(stdin) as Box); + } + + metadata(path) + .map(|i| { + let path_string = path.to_string(); + match i.file_type() { + #[cfg(unix)] + ft if ft.is_block_device() => Err(PrError::UnknownFiletype(path_string)), + #[cfg(unix)] + ft if ft.is_char_device() => Err(PrError::UnknownFiletype(path_string)), + #[cfg(unix)] + ft if ft.is_fifo() => Err(PrError::UnknownFiletype(path_string)), + #[cfg(unix)] + ft if ft.is_socket() => Err(PrError::IsSocket(path_string)), + ft if ft.is_dir() => Err(PrError::IsDirectory(path_string)), + ft if ft.is_file() || ft.is_symlink() => { + Ok(Box::new(File::open(path).context(path)?) as Box) + } + _ => Err(PrError::UnknownFiletype(path_string)), + } + }) + .unwrap_or_else(|_| Err(PrError::NotExists(path.to_string()))) +} + +fn split_lines_if_form_feed(file_content: Result) -> Vec { + file_content + .map(|content| { + let mut lines = Vec::new(); + let mut f_occurred = 0; + let mut chunk = Vec::new(); + for byte in content.as_bytes() { + if byte == &FF { + f_occurred += 1; + } else { + if f_occurred != 0 { + // First time byte occurred in the scan + lines.push(FileLine { + line_content: Ok(String::from_utf8(chunk.clone()).unwrap()), + form_feeds_after: f_occurred, + ..FileLine::default() + }); + chunk.clear(); + } + chunk.push(*byte); + f_occurred = 0; + } + } + + lines.push(FileLine { + line_content: Ok(String::from_utf8(chunk).unwrap()), + form_feeds_after: f_occurred, + ..FileLine::default() + }); + + lines + }) + .unwrap_or_else(|e| { + vec![FileLine { + line_content: Err(e), + ..FileLine::default() + }] + }) +} + +fn pr(path: &str, options: &OutputOptions) -> Result { + let lines = BufReader::with_capacity(READ_BUFFER_SIZE, open(path)?).lines(); + + let pages = read_stream_and_create_pages(options, lines, 0); + + for page_with_page_number in pages { + let page_number = page_with_page_number.0 + 1; + let page = page_with_page_number.1; + print_page(&page, options, page_number)?; + } + + Ok(0) +} + +fn read_stream_and_create_pages( + options: &OutputOptions, + lines: Lines>>, + file_id: usize, +) -> Box)>> { + let start_page = options.start_page; + let start_line_number = get_start_line_number(options); + let last_page = options.end_page; + let lines_needed_per_page = lines_to_read_for_page(options); + + Box::new( + lines + .map(split_lines_if_form_feed) + .flatten() + .enumerate() + .map(move |(i, line)| FileLine { + line_number: i + start_line_number, + file_id, + ..line + }) // Add line number and file_id + .batching(move |it| { + let mut first_page = Vec::new(); + let mut page_with_lines = Vec::new(); + for line in it { + let form_feeds_after = line.form_feeds_after; + first_page.push(line); + + if form_feeds_after > 1 { + // insert empty pages + page_with_lines.push(first_page); + for _i in 1..form_feeds_after { + page_with_lines.push(vec![]); + } + return Some(page_with_lines); + } + + if first_page.len() == lines_needed_per_page || form_feeds_after == 1 { + break; + } + } + + if first_page.is_empty() { + return None; + } + page_with_lines.push(first_page); + Some(page_with_lines) + }) // Create set of pages as form feeds could lead to empty pages + .flatten() // Flatten to pages from page sets + .enumerate() // Assign page number + .skip_while(move |(x, _)| { + // Skip the not needed pages + let current_page = x + 1; + current_page < start_page + }) + .take_while(move |(x, _)| { + // Take only the required pages + let current_page = x + 1; + + current_page >= start_page + && (last_page.is_none() || current_page <= last_page.unwrap()) + }), + ) +} + +fn mpr(paths: &[String], options: &OutputOptions) -> Result { + let n_files = paths.len(); + + // Check if files exists + for path in paths { + open(path)?; + } + + let file_line_groups = paths + .iter() + .enumerate() + .map(|(i, path)| { + let lines = BufReader::with_capacity(READ_BUFFER_SIZE, open(path).unwrap()).lines(); + + read_stream_and_create_pages(options, lines, i) + .map(move |(x, line)| { + let file_line = line; + let page_number = x + 1; + file_line + .into_iter() + .map(|fl| FileLine { + page_number, + group_key: page_number * n_files + fl.file_id, + ..fl + }) + .collect::>() + }) + .flatten() + }) + .kmerge_by(|a, b| { + if a.group_key == b.group_key { + a.line_number < b.line_number + } else { + a.group_key < b.group_key + } + }) + .group_by(|file_line| file_line.group_key); + + let start_page = options.start_page; + let mut lines = Vec::new(); + let mut page_counter = start_page; + + for (_key, file_line_group) in file_line_groups.into_iter() { + for file_line in file_line_group { + if file_line.line_content.is_err() { + return Err(file_line.line_content.unwrap_err().into()); + } + let new_page_number = file_line.page_number; + if page_counter != new_page_number { + print_page(&lines, options, page_counter)?; + lines = Vec::new(); + page_counter = new_page_number; + } + lines.push(file_line); + } + } + + print_page(&lines, options, page_counter)?; + + Ok(0) +} + +fn print_page(lines: &[FileLine], options: &OutputOptions, page: usize) -> Result { + let line_separator = options.line_separator.as_bytes(); + let page_separator = options.page_separator_char.as_bytes(); + + let header = header_content(options, page); + let trailer_content = trailer_content(options); + let out = &mut stdout(); + + out.lock(); + for x in header { + out.write_all(x.as_bytes())?; + out.write_all(line_separator)?; + } + + let lines_written = write_columns(lines, options, out)?; + + for index in 0..trailer_content.len() { + let x = trailer_content.get(index).unwrap(); + out.write_all(x.as_bytes())?; + if index + 1 != trailer_content.len() { + out.write_all(line_separator)?; + } + } + out.write_all(page_separator)?; + out.flush()?; + Ok(lines_written) +} + +fn write_columns( + lines: &[FileLine], + options: &OutputOptions, + out: &mut Stdout, +) -> Result { + let line_separator = options.content_line_separator.as_bytes(); + + let content_lines_per_page = if options.double_space { + options.content_lines_per_page / 2 + } else { + options.content_lines_per_page + }; + + let columns = options + .merge_files_print + .unwrap_or_else(|| get_columns(options)); + let line_width = options.line_width; + let mut lines_printed = 0; + let feed_line_present = options.form_feed_used; + let mut not_found_break = false; + + let across_mode = options + .column_mode_options + .as_ref() + .map(|i| i.across_mode) + .unwrap_or(false); + + let mut filled_lines = Vec::new(); + if options.merge_files_print.is_some() { + let mut offset = 0; + for col in 0..columns { + let mut inserted = 0; + for i in offset..lines.len() { + let line = lines.get(i).unwrap(); + if line.file_id != col { + break; + } + filled_lines.push(Some(line)); + inserted += 1; + } + offset += inserted; + + for _i in inserted..content_lines_per_page { + filled_lines.push(None); + } + } + } + + let table: Vec> = (0..content_lines_per_page) + .map(move |a| { + (0..columns) + .map(|i| { + if across_mode { + lines.get(a * columns + i) + } else if options.merge_files_print.is_some() { + *filled_lines + .get(content_lines_per_page * i + a) + .unwrap_or(&None) + } else { + lines.get(content_lines_per_page * i + a) + } + }) + .collect() + }) + .collect(); + + let blank_line = FileLine::default(); + for row in table { + let indexes = row.len(); + for (i, cell) in row.iter().enumerate() { + if cell.is_none() && options.merge_files_print.is_some() { + out.write_all( + get_line_for_printing(&options, &blank_line, columns, i, &line_width, indexes) + .as_bytes(), + )?; + } else if cell.is_none() { + not_found_break = true; + break; + } else if cell.is_some() { + let file_line = cell.unwrap(); + + out.write_all( + get_line_for_printing(&options, file_line, columns, i, &line_width, indexes) + .as_bytes(), + )?; + lines_printed += 1; + } + } + if not_found_break && feed_line_present { + break; + } else { + out.write_all(line_separator)?; + } + } + + Ok(lines_printed) +} + +fn get_line_for_printing( + options: &OutputOptions, + file_line: &FileLine, + columns: usize, + index: usize, + line_width: &Option, + indexes: usize, +) -> String { + let blank_line = String::new(); + let formatted_line_number = get_formatted_line_number(&options, file_line.line_number, index); + + let mut complete_line = format!( + "{}{}", + formatted_line_number, + file_line.line_content.as_ref().unwrap() + ); + + let offset_spaces = &options.offset_spaces; + + let tab_count = complete_line.chars().filter(|i| i == &TAB).count(); + + let display_length = complete_line.len() + (tab_count * 7); + + let sep = if (index + 1) != indexes && !options.join_lines { + &options.col_sep_for_printing + } else { + &blank_line + }; + + format!( + "{}{}{}", + offset_spaces, + line_width + .map(|i| { + let min_width = (i - (columns - 1)) / columns; + if display_length < min_width { + for _i in 0..(min_width - display_length) { + complete_line.push(' '); + } + } + + complete_line.chars().take(min_width).collect() + }) + .unwrap_or(complete_line), + sep + ) +} + +fn get_formatted_line_number(opts: &OutputOptions, line_number: usize, index: usize) -> String { + let should_show_line_number = + opts.number.is_some() && (opts.merge_files_print.is_none() || index == 0); + if should_show_line_number && line_number != 0 { + let line_str = line_number.to_string(); + let num_opt = opts.number.as_ref().unwrap(); + let width = num_opt.width; + let separator = &num_opt.separator; + if line_str.len() >= width { + format!( + "{:>width$}{}", + &line_str[line_str.len() - width..], + separator, + width = width + ) + } else { + format!("{:>width$}{}", line_str, separator, width = width) + } + } else { + String::new() + } +} + +/// Returns a five line header content if displaying header is not disabled by +/// using `NO_HEADER_TRAILER_OPTION` option. +fn header_content(options: &OutputOptions, page: usize) -> Vec { + if options.display_header_and_trailer { + let first_line = format!( + "{} {} Page {}", + options.last_modified_time, options.header, page + ); + vec![ + String::new(), + String::new(), + first_line, + String::new(), + String::new(), + ] + } else { + Vec::new() + } +} + +fn file_last_modified_time(path: &str) -> String { + metadata(path) + .map(|i| { + i.modified() + .map(|x| { + let date_time: DateTime = x.into(); + date_time.format("%b %d %H:%M %Y").to_string() + }) + .unwrap_or_default() + }) + .unwrap_or_default() +} + +/// Returns five empty lines as trailer content if displaying trailer +/// is not disabled by using `NO_HEADER_TRAILER_OPTION`option. +fn trailer_content(options: &OutputOptions) -> Vec { + if options.display_header_and_trailer && !options.form_feed_used { + vec![ + String::new(), + String::new(), + String::new(), + String::new(), + String::new(), + ] + } else { + Vec::new() + } +} + +/// Returns starting line number for the file to be printed. +/// If -N is specified the first line number changes otherwise +/// default is 1. +fn get_start_line_number(opts: &OutputOptions) -> usize { + opts.number.as_ref().map(|i| i.first_number).unwrap_or(1) +} + +/// Returns number of lines to read from input for constructing one page of pr output. +/// If double space -d is used lines are halved. +/// If columns --columns is used the lines are multiplied by the value. +fn lines_to_read_for_page(opts: &OutputOptions) -> usize { + let content_lines_per_page = opts.content_lines_per_page; + let columns = get_columns(opts); + if opts.double_space { + (content_lines_per_page / 2) * columns + } else { + content_lines_per_page * columns + } +} + +/// Returns number of columns to output +fn get_columns(opts: &OutputOptions) -> usize { + opts.column_mode_options + .as_ref() + .map(|i| i.columns) + .unwrap_or(1) +} diff --git a/src/uu/printenv/src/main.rs b/src/uu/printenv/src/main.rs index 328c3b485..b61cbe90a 100644 --- a/src/uu/printenv/src/main.rs +++ b/src/uu/printenv/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_printenv); // spell-checker:ignore procs uucore printenv +uucore_procs::main!(uu_printenv); diff --git a/src/uu/printf/src/main.rs b/src/uu/printf/src/main.rs index aa9a45be5..9def7dafe 100644 --- a/src/uu/printf/src/main.rs +++ b/src/uu/printf/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_printf); // spell-checker:ignore procs uucore printf +uucore_procs::main!(uu_printf); diff --git a/src/uu/printf/src/tokenize/num_format/format_field.rs b/src/uu/printf/src/tokenize/num_format/format_field.rs index 68786e815..02998cde5 100644 --- a/src/uu/printf/src/tokenize/num_format/format_field.rs +++ b/src/uu/printf/src/tokenize/num_format/format_field.rs @@ -1,4 +1,4 @@ -// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum fprim interp +// spell-checker:ignore (vars) charf decf floatf intf scif strf Cninety //! Primitives used by Sub Tokenizer //! and num_format modules diff --git a/src/uu/printf/src/tokenize/num_format/formatter.rs b/src/uu/printf/src/tokenize/num_format/formatter.rs index 35faff2a9..f5f5d71b1 100644 --- a/src/uu/printf/src/tokenize/num_format/formatter.rs +++ b/src/uu/printf/src/tokenize/num_format/formatter.rs @@ -1,5 +1,3 @@ -// spell-checker:ignore (ToDO) inprefix for conv - //! Primitives used by num_format and sub_modules. //! never dealt with above (e.g. Sub Tokenizer never uses these) @@ -41,7 +39,7 @@ pub enum Base { // information from the beginning of a numeric argument // the precedes the beginning of a numeric value -pub struct InPrefix { +pub struct InitialPrefix { pub radix_in: Base, pub sign: i8, pub offset: usize, @@ -54,7 +52,7 @@ pub trait Formatter { fn get_primitive( &self, field: &FormatField, - inprefix: &InPrefix, + in_prefix: &InitialPrefix, str_in: &str, ) -> Option; // return a string from a FormatPrimitive, diff --git a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs index 7d1d805c6..a20f03a95 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/mod.rs @@ -1,4 +1,4 @@ -// spell-checker:ignore (ToDO) arrnum mult basenum bufferval refd vals arrfloat conv intermed addl +// spell-checker:ignore (ToDO) arrnum arr_num mult basenum bufferval refd vals arrfloat conv intermed addl pub fn arrnum_int_mult(arr_num: &[u8], basenum: u8, base_ten_int_fact: u8) -> Vec { let mut carry: u16 = 0; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs index fcac4392e..7945d41ac 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/base_conv/tests.rs @@ -1,4 +1,4 @@ -// spell-checker:ignore (ToDO) conv arrnum mult shortcircuit +// spell-checker:ignore (ToDO) arrnum mult #[cfg(test)] use super::*; @@ -29,7 +29,7 @@ fn test_arrnum_int_non_base_10() { } #[test] -fn test_arrnum_int_div_shortcircuit() { +fn test_arrnum_int_div_short_circuit() { // ( let arrnum: Vec = vec![5, 5, 5, 5, 0]; let base_num = 10; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs b/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs index 870e64712..f96a991b5 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/cninetyninehexfloatf.rs @@ -1,8 +1,9 @@ -// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum +// spell-checker:ignore (vars) charf decf floatf intf scif strf Cninety +// spell-checker:ignore (ToDO) arrnum //! formatter for %a %F C99 Hex-floating-point subs use super::super::format_field::FormatField; -use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; +use super::super::formatter::{FormatPrimitive, Formatter, InitialPrefix}; use super::base_conv; use super::base_conv::RadixDef; use super::float_common::{primitive_to_str_common, FloatAnalysis}; @@ -20,15 +21,20 @@ impl Formatter for CninetyNineHexFloatf { fn get_primitive( &self, field: &FormatField, - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, str_in: &str, ) -> Option { let second_field = field.second_field.unwrap_or(6) + 1; - let analysis = - FloatAnalysis::analyze(&str_in, inprefix, Some(second_field as usize), None, true); + let analysis = FloatAnalysis::analyze( + &str_in, + initial_prefix, + Some(second_field as usize), + None, + true, + ); let f = get_primitive_hex( - inprefix, - &str_in[inprefix.offset..], + initial_prefix, + &str_in[initial_prefix.offset..], &analysis, second_field as usize, *field.field_char == 'A', @@ -44,13 +50,17 @@ impl Formatter for CninetyNineHexFloatf { // on the todo list is to have a trait for get_primitive that is implemented by each float formatter and can override a default. when that happens we can take the parts of get_primitive_dec specific to dec and spin them out to their own functions that can be overridden. fn get_primitive_hex( - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, _str_in: &str, _analysis: &FloatAnalysis, _last_dec_place: usize, capitalized: bool, ) -> FormatPrimitive { - let prefix = Some(String::from(if inprefix.sign == -1 { "-0x" } else { "0x" })); + let prefix = Some(String::from(if initial_prefix.sign == -1 { + "-0x" + } else { + "0x" + })); // TODO actual conversion, make sure to get back mantissa. // for hex to hex, it's really just a matter of moving the @@ -63,7 +73,7 @@ fn get_primitive_hex( // the difficult part of this (arrnum_int_div_step) is already implemented. // the hex float name may be a bit misleading in terms of how to go about the - // conversion. The best way to do it is to just convert the floatnum + // conversion. The best way to do it is to just convert the float number // directly to base 2 and then at the end translate back to hex. let mantissa = 0; let suffix = Some({ @@ -82,15 +92,15 @@ fn get_primitive_hex( } fn to_hex(src: &str, before_decimal: bool) -> String { - let rten = base_conv::RadixTen; - let rhex = base_conv::RadixHex; + let radix_ten = base_conv::RadixTen; + let radix_hex = base_conv::RadixHex; if before_decimal { - base_conv::base_conv_str(src, &rten, &rhex) + base_conv::base_conv_str(src, &radix_ten, &radix_hex) } else { - let as_arrnum_ten = base_conv::str_to_arrnum(src, &rten); + let as_arrnum_ten = base_conv::str_to_arrnum(src, &radix_ten); let s = format!( "{}", - base_conv::base_conv_float(&as_arrnum_ten, rten.get_max(), rhex.get_max()) + base_conv::base_conv_float(&as_arrnum_ten, radix_ten.get_max(), radix_hex.get_max()) ); if s.len() > 2 { String::from(&s[2..]) diff --git a/src/uu/printf/src/tokenize/num_format/formatters/decf.rs b/src/uu/printf/src/tokenize/num_format/formatters/decf.rs index 448771f22..5798eadcb 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/decf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/decf.rs @@ -1,22 +1,22 @@ -// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum fprim interp +// spell-checker:ignore (vars) charf decf floatf intf scif strf Cninety //! formatter for %g %G decimal subs use super::super::format_field::FormatField; -use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; +use super::super::formatter::{FormatPrimitive, Formatter, InitialPrefix}; use super::float_common::{get_primitive_dec, primitive_to_str_common, FloatAnalysis}; -fn get_len_fprim(fprim: &FormatPrimitive) -> usize { +fn get_len_fmt_primitive(fmt: &FormatPrimitive) -> usize { let mut len = 0; - if let Some(ref s) = fprim.prefix { + if let Some(ref s) = fmt.prefix { len += s.len(); } - if let Some(ref s) = fprim.pre_decimal { + if let Some(ref s) = fmt.pre_decimal { len += s.len(); } - if let Some(ref s) = fprim.post_decimal { + if let Some(ref s) = fmt.post_decimal { len += s.len(); } - if let Some(ref s) = fprim.suffix { + if let Some(ref s) = fmt.suffix { len += s.len(); } len @@ -33,22 +33,22 @@ impl Formatter for Decf { fn get_primitive( &self, field: &FormatField, - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, str_in: &str, ) -> Option { let second_field = field.second_field.unwrap_or(6) + 1; - // default to scif interp. so as to not truncate input vals + // default to scif interpretation so as to not truncate input vals // (that would be displayed in scif) based on relation to decimal place let analysis = FloatAnalysis::analyze( str_in, - inprefix, + initial_prefix, Some(second_field as usize + 1), None, false, ); let mut f_sci = get_primitive_dec( - inprefix, - &str_in[inprefix.offset..], + initial_prefix, + &str_in[initial_prefix.offset..], &analysis, second_field as usize, Some(*field.field_char == 'G'), @@ -70,17 +70,19 @@ impl Formatter for Decf { } } let f_fl = get_primitive_dec( - inprefix, - &str_in[inprefix.offset..], + initial_prefix, + &str_in[initial_prefix.offset..], &analysis, second_field as usize, None, ); - Some(if get_len_fprim(&f_fl) >= get_len_fprim(&f_sci) { - f_sci - } else { - f_fl - }) + Some( + if get_len_fmt_primitive(&f_fl) >= get_len_fmt_primitive(&f_sci) { + f_sci + } else { + f_fl + }, + ) } fn primitive_to_str(&self, prim: &FormatPrimitive, field: FormatField) -> String { primitive_to_str_common(prim, &field) diff --git a/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs b/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs index a107078ae..dd8259233 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/float_common.rs @@ -1,7 +1,10 @@ -// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix hexifying glibc floatnum rten rhex arrnum +// spell-checker:ignore (vars) charf decf floatf intf scif strf Cninety +// spell-checker:ignore (ToDO) arrnum use super::super::format_field::FormatField; -use super::super::formatter::{get_it_at, warn_incomplete_conv, Base, FormatPrimitive, InPrefix}; +use super::super::formatter::{ + get_it_at, warn_incomplete_conv, Base, FormatPrimitive, InitialPrefix, +}; use super::base_conv; use super::base_conv::RadixDef; @@ -39,7 +42,7 @@ fn has_enough_digits( impl FloatAnalysis { pub fn analyze( str_in: &str, - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, max_sd_opt: Option, max_after_dec_opt: Option, hex_output: bool, @@ -47,13 +50,13 @@ impl FloatAnalysis { // this fn assumes // the input string // has no leading spaces or 0s - let str_it = get_it_at(inprefix.offset, str_in); + let str_it = get_it_at(initial_prefix.offset, str_in); let mut ret = FloatAnalysis { len_important: 0, decimal_pos: None, follow: None, }; - let hex_input = match inprefix.radix_in { + let hex_input = match initial_prefix.radix_in { Base::Hex => true, Base::Ten => false, Base::Octal => { @@ -126,15 +129,15 @@ impl FloatAnalysis { } fn de_hex(src: &str, before_decimal: bool) -> String { - let rten = base_conv::RadixTen; - let rhex = base_conv::RadixHex; + let radix_ten = base_conv::RadixTen; + let radix_hex = base_conv::RadixHex; if before_decimal { - base_conv::base_conv_str(src, &rhex, &rten) + base_conv::base_conv_str(src, &radix_hex, &radix_ten) } else { - let as_arrnum_hex = base_conv::str_to_arrnum(src, &rhex); + let as_arrnum_hex = base_conv::str_to_arrnum(src, &radix_hex); let s = format!( "{}", - base_conv::base_conv_float(&as_arrnum_hex, rhex.get_max(), rten.get_max()) + base_conv::base_conv_float(&as_arrnum_hex, radix_hex.get_max(), radix_ten.get_max()) ); if s.len() > 2 { String::from(&s[2..]) @@ -200,7 +203,7 @@ fn round_terminal_digit( } pub fn get_primitive_dec( - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, str_in: &str, analysis: &FloatAnalysis, last_dec_place: usize, @@ -209,7 +212,7 @@ pub fn get_primitive_dec( let mut f: FormatPrimitive = Default::default(); // add negative sign section - if inprefix.sign == -1 { + if initial_prefix.sign == -1 { f.prefix = Some(String::from("-")); } @@ -223,8 +226,8 @@ pub fn get_primitive_dec( if first_segment_raw.is_empty() { first_segment_raw = "0"; } - // convert to string, de_hexifying if input is in hex. - let (first_segment, second_segment) = match inprefix.radix_in { + // convert to string, de_hexifying if input is in hex // spell-checker:disable-line + let (first_segment, second_segment) = match initial_prefix.radix_in { Base::Hex => ( de_hex(first_segment_raw, true), de_hex(second_segment_raw, false), diff --git a/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs b/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs index b3de2f98a..aed50f18e 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/floatf.rs @@ -1,8 +1,9 @@ -// spell-checker:ignore (ToDO) floatf inprefix +// spell-checker:ignore (vars) charf decf floatf intf scif strf Cninety +// spell-checker:ignore (ToDO) arrnum //! formatter for %f %F common-notation floating-point subs use super::super::format_field::FormatField; -use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; +use super::super::formatter::{FormatPrimitive, Formatter, InitialPrefix}; use super::float_common::{get_primitive_dec, primitive_to_str_common, FloatAnalysis}; pub struct Floatf; @@ -15,15 +16,20 @@ impl Formatter for Floatf { fn get_primitive( &self, field: &FormatField, - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, str_in: &str, ) -> Option { let second_field = field.second_field.unwrap_or(6) + 1; - let analysis = - FloatAnalysis::analyze(&str_in, inprefix, None, Some(second_field as usize), false); + let analysis = FloatAnalysis::analyze( + &str_in, + initial_prefix, + None, + Some(second_field as usize), + false, + ); let f = get_primitive_dec( - inprefix, - &str_in[inprefix.offset..], + initial_prefix, + &str_in[initial_prefix.offset..], &analysis, second_field as usize, None, diff --git a/src/uu/printf/src/tokenize/num_format/formatters/intf.rs b/src/uu/printf/src/tokenize/num_format/formatters/intf.rs index 2e4e67047..02c59211b 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/intf.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/intf.rs @@ -1,11 +1,12 @@ -// spell-checker:ignore (ToDO) fchar conv decr inprefix intf ints finalstr +// spell-checker:ignore (vars) charf decf floatf intf scif strf Cninety +// spell-checker:ignore (ToDO) arrnum //! formatter for unsigned and signed int subs -//! unsigned ints: %X %x (hex u64) %o (octal u64) %u (base ten u64) -//! signed ints: %i %d (both base ten i64) +//! unsigned int: %X %x (hex u64) %o (octal u64) %u (base ten u64) +//! signed int: %i %d (both base ten i64) use super::super::format_field::FormatField; use super::super::formatter::{ - get_it_at, warn_incomplete_conv, Base, FormatPrimitive, Formatter, InPrefix, + get_it_at, warn_incomplete_conv, Base, FormatPrimitive, Formatter, InitialPrefix, }; use std::i64; use std::u64; @@ -38,19 +39,19 @@ impl Intf { // is_zero: true if number is zero, false otherwise // len_digits: length of digits used to create the int // important, for example, if we run into a non-valid character - fn analyze(str_in: &str, signed_out: bool, inprefix: &InPrefix) -> IntAnalysis { + fn analyze(str_in: &str, signed_out: bool, initial_prefix: &InitialPrefix) -> IntAnalysis { // the maximum number of digits we could conceivably // have before the decimal point without exceeding the // max - let mut str_it = get_it_at(inprefix.offset, str_in); + let mut str_it = get_it_at(initial_prefix.offset, str_in); let max_sd_in = if signed_out { - match inprefix.radix_in { + match initial_prefix.radix_in { Base::Ten => 19, Base::Octal => 21, Base::Hex => 16, } } else { - match inprefix.radix_in { + match initial_prefix.radix_in { Base::Ten => 20, Base::Octal => 22, Base::Hex => 16, @@ -118,13 +119,13 @@ impl Intf { } // get a FormatPrimitive of the maximum value for the field char // and given sign - fn get_max(fchar: char, sign: i8) -> FormatPrimitive { - let mut fmt_prim: FormatPrimitive = Default::default(); - fmt_prim.pre_decimal = Some(String::from(match fchar { + fn get_max(field_char: char, sign: i8) -> FormatPrimitive { + let mut fmt_primitive: FormatPrimitive = Default::default(); + fmt_primitive.pre_decimal = Some(String::from(match field_char { 'd' | 'i' => match sign { 1 => "9223372036854775807", _ => { - fmt_prim.prefix = Some(String::from("-")); + fmt_primitive.prefix = Some(String::from("-")); "9223372036854775808" } }, @@ -132,7 +133,7 @@ impl Intf { 'o' => "1777777777777777777777", /* 'u' | */ _ => "18446744073709551615", })); - fmt_prim + fmt_primitive } // conv_from_segment contract: // 1. takes @@ -149,8 +150,13 @@ impl Intf { // - if the string falls outside bounds: // for i64 output, the int minimum or int max (depending on sign) // for u64 output, the u64 max in the output radix - fn conv_from_segment(segment: &str, radix_in: Base, fchar: char, sign: i8) -> FormatPrimitive { - match fchar { + fn conv_from_segment( + segment: &str, + radix_in: Base, + field_char: char, + sign: i8, + ) -> FormatPrimitive { + match field_char { 'i' | 'd' => match i64::from_str_radix(segment, radix_in as u32) { Ok(i) => { let mut fmt_prim: FormatPrimitive = Default::default(); @@ -160,13 +166,13 @@ impl Intf { fmt_prim.pre_decimal = Some(format!("{}", i)); fmt_prim } - Err(_) => Intf::get_max(fchar, sign), + Err(_) => Intf::get_max(field_char, sign), }, _ => match u64::from_str_radix(segment, radix_in as u32) { Ok(u) => { let mut fmt_prim: FormatPrimitive = Default::default(); let u_f = if sign == -1 { u64::MAX - (u - 1) } else { u }; - fmt_prim.pre_decimal = Some(match fchar { + fmt_prim.pre_decimal = Some(match field_char { 'X' => format!("{:X}", u_f), 'x' => format!("{:x}", u_f), 'o' => format!("{:o}", u_f), @@ -174,7 +180,7 @@ impl Intf { }); fmt_prim } - Err(_) => Intf::get_max(fchar, sign), + Err(_) => Intf::get_max(field_char, sign), }, } } @@ -183,17 +189,17 @@ impl Formatter for Intf { fn get_primitive( &self, field: &FormatField, - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, str_in: &str, ) -> Option { - let begin = inprefix.offset; + let begin = initial_prefix.offset; // get information about the string. see Intf::Analyze // def above. let convert_hints = Intf::analyze( str_in, *field.field_char == 'i' || *field.field_char == 'd', - inprefix, + initial_prefix, ); // We always will have a format primitive to return Some(if convert_hints.len_digits == 0 || convert_hints.is_zero { @@ -209,22 +215,22 @@ impl Formatter for Intf { 'x' | 'X' => Base::Hex, /* 'o' | */ _ => Base::Octal, }; - let radix_mismatch = !radix_out.eq(&inprefix.radix_in); - let decr_from_max: bool = inprefix.sign == -1 && *field.field_char != 'i'; + let radix_mismatch = !radix_out.eq(&initial_prefix.radix_in); + let decrease_from_max: bool = initial_prefix.sign == -1 && *field.field_char != 'i'; let end = begin + convert_hints.len_digits as usize; // convert to int if any one of these is true: // - number of digits in int indicates it may be past max // - we're subtracting from the max // - we're converting the base - if convert_hints.check_past_max || decr_from_max || radix_mismatch { + if convert_hints.check_past_max || decrease_from_max || radix_mismatch { // radix of in and out is the same. let segment = String::from(&str_in[begin..end]); Intf::conv_from_segment( &segment, - inprefix.radix_in.clone(), + initial_prefix.radix_in.clone(), *field.field_char, - inprefix.sign, + initial_prefix.sign, ) } else { // otherwise just do a straight string copy. @@ -233,20 +239,20 @@ impl Formatter for Intf { // this is here and not earlier because // zero doesn't get a sign, and conv_from_segment // creates its format primitive separately - if inprefix.sign == -1 && *field.field_char == 'i' { + if initial_prefix.sign == -1 && *field.field_char == 'i' { fmt_prim.prefix = Some(String::from("-")); } fmt_prim.pre_decimal = Some(String::from(&str_in[begin..end])); fmt_prim } } else { - Intf::get_max(*field.field_char, inprefix.sign) + Intf::get_max(*field.field_char, initial_prefix.sign) }) } fn primitive_to_str(&self, prim: &FormatPrimitive, field: FormatField) -> String { - let mut finalstr: String = String::new(); + let mut final_str: String = String::new(); if let Some(ref prefix) = prim.prefix { - finalstr.push_str(&prefix); + final_str.push_str(&prefix); } // integral second fields is zero-padded minimum-width // which gets handled before general minimum-width @@ -256,11 +262,11 @@ impl Formatter for Intf { let mut i = min; let len = pre_decimal.len() as u32; while i > len { - finalstr.push('0'); + final_str.push('0'); i -= 1; } } - finalstr.push_str(&pre_decimal); + final_str.push_str(&pre_decimal); } None => { panic!( @@ -269,6 +275,6 @@ impl Formatter for Intf { ); } } - finalstr + final_str } } diff --git a/src/uu/printf/src/tokenize/num_format/formatters/mod.rs b/src/uu/printf/src/tokenize/num_format/formatters/mod.rs index ccbcdb1e7..e23230071 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/mod.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/mod.rs @@ -1,4 +1,4 @@ -// spell-checker:ignore (ToDO) conv cninetyninehexfloatf floatf intf scif +// spell-checker:ignore (vars) charf cninetyninehexfloatf decf floatf intf scif strf Cninety mod base_conv; pub mod cninetyninehexfloatf; diff --git a/src/uu/printf/src/tokenize/num_format/formatters/scif.rs b/src/uu/printf/src/tokenize/num_format/formatters/scif.rs index ebac1565e..c46c7d423 100644 --- a/src/uu/printf/src/tokenize/num_format/formatters/scif.rs +++ b/src/uu/printf/src/tokenize/num_format/formatters/scif.rs @@ -1,8 +1,8 @@ -// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety inprefix +// spell-checker:ignore (vars) charf cninetyninehexfloatf decf floatf intf scif strf Cninety //! formatter for %e %E scientific notation subs use super::super::format_field::FormatField; -use super::super::formatter::{FormatPrimitive, Formatter, InPrefix}; +use super::super::formatter::{FormatPrimitive, Formatter, InitialPrefix}; use super::float_common::{get_primitive_dec, primitive_to_str_common, FloatAnalysis}; pub struct Scif; @@ -16,20 +16,20 @@ impl Formatter for Scif { fn get_primitive( &self, field: &FormatField, - inprefix: &InPrefix, + initial_prefix: &InitialPrefix, str_in: &str, ) -> Option { let second_field = field.second_field.unwrap_or(6) + 1; let analysis = FloatAnalysis::analyze( str_in, - inprefix, + initial_prefix, Some(second_field as usize + 1), None, false, ); let f = get_primitive_dec( - inprefix, - &str_in[inprefix.offset..], + initial_prefix, + &str_in[initial_prefix.offset..], &analysis, second_field as usize, Some(*field.field_char == 'E'), diff --git a/src/uu/printf/src/tokenize/num_format/num_format.rs b/src/uu/printf/src/tokenize/num_format/num_format.rs index 812f51b5a..a8a60cc57 100644 --- a/src/uu/printf/src/tokenize/num_format/num_format.rs +++ b/src/uu/printf/src/tokenize/num_format/num_format.rs @@ -1,12 +1,14 @@ -// spell-checker:ignore (ToDO) conv intf strf floatf scif charf fieldtype vals subparser unescaping submodule Cninety qchar topchar structs fmtr fchar inprefix devs octals cninetyninehexfloatf +// spell-checker:ignore (vars) charf cninetyninehexfloatf decf floatf intf scif strf Cninety //! handles creating printed output for numeric substitutions +// spell-checker:ignore (vars) charf decf floatf intf scif strf Cninety + use std::env; use std::vec::Vec; use super::format_field::{FieldType, FormatField}; -use super::formatter::{Base, FormatPrimitive, Formatter, InPrefix}; +use super::formatter::{Base, FormatPrimitive, Formatter, InitialPrefix}; use super::formatters::cninetyninehexfloatf::CninetyNineHexFloatf; use super::formatters::decf::Decf; use super::formatters::floatf::Floatf; @@ -46,8 +48,8 @@ fn get_provided(str_in_opt: Option<&String>) -> Option { match str_in_opt { Some(str_in) => { let mut byte_it = str_in.bytes(); - if let Some(qchar) = byte_it.next() { - match qchar { + if let Some(ch) = byte_it.next() { + match ch { C_S_QUOTE | C_D_QUOTE => { Some(match byte_it.next() { Some(second_byte) => { @@ -62,7 +64,7 @@ fn get_provided(str_in_opt: Option<&String>) -> Option { } // no byte after quote None => { - let so_far = (qchar as u8 as char).to_string(); + let so_far = (ch as u8 as char).to_string(); warn_expected_numeric(&so_far); 0_u8 } @@ -84,30 +86,30 @@ fn get_provided(str_in_opt: Option<&String>) -> Option { // a base, // and an offset for index after all // initial spacing, sign, base prefix, and leading zeroes -fn get_inprefix(str_in: &str, field_type: &FieldType) -> InPrefix { +fn get_initial_prefix(str_in: &str, field_type: &FieldType) -> InitialPrefix { let mut str_it = str_in.chars(); - let mut ret = InPrefix { + let mut ret = InitialPrefix { radix_in: Base::Ten, sign: 1, offset: 0, }; - let mut topchar = str_it.next(); - // skip spaces and ensure topchar is the first non-space char + let mut top_char = str_it.next(); + // skip spaces and ensure top_char is the first non-space char // (or None if none exists) - while let Some(' ') = topchar { + while let Some(' ') = top_char { ret.offset += 1; - topchar = str_it.next(); + top_char = str_it.next(); } // parse sign - match topchar { + match top_char { Some('+') => { ret.offset += 1; - topchar = str_it.next(); + top_char = str_it.next(); } Some('-') => { ret.sign = -1; ret.offset += 1; - topchar = str_it.next(); + top_char = str_it.next(); } _ => {} } @@ -125,7 +127,7 @@ fn get_inprefix(str_in: &str, field_type: &FieldType) -> InPrefix { // final offset. If the zero could be before // a decimal point we don't move past the zero. let mut is_hex = false; - if Some('0') == topchar { + if Some('0') == top_char { if let Some(base) = str_it.next() { // lead zeroes can only exist in // octal and hex base @@ -152,7 +154,7 @@ fn get_inprefix(str_in: &str, field_type: &FieldType) -> InPrefix { let mut first = true; for ch_zero in str_it { // see notes on offset above: - // this is why the offset for octals and decimals + // this is why the offset for octal and decimal numbers // that reach this branch is 1 even though // they have already eaten the characters '00' // this is also why when hex encounters its @@ -194,21 +196,21 @@ fn get_inprefix(str_in: &str, field_type: &FieldType) -> InPrefix { // if it is a numeric field, passing the field details // and an iterator to the argument pub fn num_format(field: &FormatField, in_str_opt: Option<&String>) -> Option { - let fchar = field.field_char; + let field_char = field.field_char; // num format mainly operates by further delegating to one of // several Formatter structs depending on the field // see formatter.rs for more details // to do switch to static dispatch - let fmtr: Box = match *field.field_type { + let formatter: Box = match *field.field_type { FieldType::Intf => Box::new(Intf::new()), FieldType::Floatf => Box::new(Floatf::new()), FieldType::CninetyNineHexFloatf => Box::new(CninetyNineHexFloatf::new()), FieldType::Scif => Box::new(Scif::new()), FieldType::Decf => Box::new(Decf::new()), _ => { - panic!("asked to do num format with non-num fieldtype"); + panic!("asked to do num format with non-num field type"); } }; let prim_opt= @@ -216,7 +218,7 @@ pub fn num_format(field: &FormatField, in_str_opt: Option<&String>) -> Option { tmp.pre_decimal = Some( format!("{}", provided_num)); @@ -231,11 +233,11 @@ pub fn num_format(field: &FormatField, in_str_opt: Option<&String>) -> Option { let as_str = format!("{}", provided_num); - let inprefix = get_inprefix( + let initial_prefix = get_initial_prefix( &as_str, &field.field_type ); - tmp=fmtr.get_primitive(field, &inprefix, &as_str) + tmp=formatter.get_primitive(field, &initial_prefix, &as_str) .expect("err during default provided num"); }, _ => { @@ -254,14 +256,14 @@ pub fn num_format(field: &FormatField, in_str_opt: Option<&String>) -> Option FieldType::Charf, _ => { // should be unreachable. - println!("Invalid fieldtype"); + println!("Invalid field type"); exit(cli::EXIT_ERR); } }; @@ -130,7 +130,7 @@ impl SubParser { } } fn build_token(parser: SubParser) -> Box { - // not a self method so as to allow move of subparser vals. + // not a self method so as to allow move of sub-parser vals. // return new Sub struct as token let t: Box = Box::new(Sub::new( if parser.min_width_is_asterisk { @@ -354,7 +354,7 @@ impl token::Token for Sub { // field char let pre_min_width_opt: Option = match *field.field_type { // if %s just return arg - // if %b use UnescapedText module's unescaping-fn + // if %b use UnescapedText module's unescape-fn // if %c return first char of arg FieldType::Strf | FieldType::Charf => { match pf_arg { diff --git a/src/uu/ptx/src/main.rs b/src/uu/ptx/src/main.rs index 0b235443a..b627b801f 100644 --- a/src/uu/ptx/src/main.rs +++ b/src/uu/ptx/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_ptx); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_ptx); diff --git a/src/uu/ptx/src/ptx.rs b/src/uu/ptx/src/ptx.rs index a17f7c810..5b0c35093 100644 --- a/src/uu/ptx/src/ptx.rs +++ b/src/uu/ptx/src/ptx.rs @@ -246,7 +246,7 @@ fn read_input(input_files: &[String], config: &Config) -> FileMap { file_map } -/// Go through every lines in the input files and record each match occurance as a `WordRef`. +/// Go through every lines in the input files and record each match occurrence as a `WordRef`. fn create_word_set(config: &Config, filter: &WordFilter, file_map: &FileMap) -> BTreeSet { let reg = Regex::new(&filter.word_regex).unwrap(); let ref_reg = Regex::new(&config.context_regex).unwrap(); @@ -412,7 +412,7 @@ fn get_output_chunks( 0, ) as usize; - // the tail chunk takes text starting from where the after chunk ends (with whitespaces trimmed). + // the tail chunk takes text starting from where the after chunk ends (with whitespace trimmed). let (tail_beg, _) = trim_idx(all_after, after_end, all_after.len()); // end = begin + max length @@ -493,10 +493,10 @@ fn format_tex_line( output.push_str(&format!("\\{} ", config.macro_name)); let all_before = if config.input_ref { let before = &line[0..word_ref.position]; - let before_start_trimoff = + let before_start_trim_offset = word_ref.position - before.trim_start_matches(reference).trim_start().len(); let before_end_index = before.len(); - &chars_line[before_start_trimoff..cmp::max(before_end_index, before_start_trimoff)] + &chars_line[before_start_trim_offset..cmp::max(before_end_index, before_start_trim_offset)] } else { let before_chars_trim_idx = (0, word_ref.position); &chars_line[before_chars_trim_idx.0..before_chars_trim_idx.1] @@ -536,10 +536,10 @@ fn format_roff_line( output.push_str(&format!(".{}", config.macro_name)); let all_before = if config.input_ref { let before = &line[0..word_ref.position]; - let before_start_trimoff = + let before_start_trim_offset = word_ref.position - before.trim_start_matches(reference).trim_start().len(); let before_end_index = before.len(); - &chars_line[before_start_trimoff..cmp::max(before_end_index, before_start_trimoff)] + &chars_line[before_start_trim_offset..cmp::max(before_end_index, before_start_trim_offset)] } else { let before_chars_trim_idx = (0, word_ref.position); &chars_line[before_chars_trim_idx.0..before_chars_trim_idx.1] diff --git a/src/uu/pwd/src/main.rs b/src/uu/pwd/src/main.rs index 4445b7891..c5716d2c9 100644 --- a/src/uu/pwd/src/main.rs +++ b/src/uu/pwd/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_pwd); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_pwd); diff --git a/src/uu/readlink/src/main.rs b/src/uu/readlink/src/main.rs index e5aab3cb6..651fd73ca 100644 --- a/src/uu/readlink/src/main.rs +++ b/src/uu/readlink/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_readlink); // spell-checker:ignore procs uucore readlink +uucore_procs::main!(uu_readlink); diff --git a/src/uu/realpath/src/main.rs b/src/uu/realpath/src/main.rs index 3a74bc5f6..8b8a8dc5e 100644 --- a/src/uu/realpath/src/main.rs +++ b/src/uu/realpath/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_realpath); // spell-checker:ignore procs uucore realpath +uucore_procs::main!(uu_realpath); diff --git a/src/uu/relpath/src/main.rs b/src/uu/relpath/src/main.rs index a5f866bb2..22aa68d53 100644 --- a/src/uu/relpath/src/main.rs +++ b/src/uu/relpath/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_relpath); // spell-checker:ignore procs uucore relpath +uucore_procs::main!(uu_relpath); diff --git a/src/uu/rm/src/main.rs b/src/uu/rm/src/main.rs index ebb998c39..960867359 100644 --- a/src/uu/rm/src/main.rs +++ b/src/uu/rm/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_rm); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_rm); diff --git a/src/uu/rmdir/src/main.rs b/src/uu/rmdir/src/main.rs index ab1939b4a..92ff22c07 100644 --- a/src/uu/rmdir/src/main.rs +++ b/src/uu/rmdir/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_rmdir); // spell-checker:ignore procs uucore rmdir +uucore_procs::main!(uu_rmdir); diff --git a/src/uu/rmdir/src/rmdir.rs b/src/uu/rmdir/src/rmdir.rs index bebb2844b..d39c33f77 100644 --- a/src/uu/rmdir/src/rmdir.rs +++ b/src/uu/rmdir/src/rmdir.rs @@ -5,6 +5,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (ToDO) ENOTDIR + #[macro_use] extern crate uucore; diff --git a/src/uu/seq/Cargo.toml b/src/uu/seq/Cargo.toml index 96c629c68..32f2bbac8 100644 --- a/src/uu/seq/Cargo.toml +++ b/src/uu/seq/Cargo.toml @@ -16,6 +16,8 @@ path = "src/seq.rs" [dependencies] clap = "2.33" +num-bigint = "0.4.0" +num-traits = "0.2.14" uucore = { version=">=0.0.8", package="uucore", path="../../uucore" } uucore_procs = { version=">=0.0.5", package="uucore_procs", path="../../uucore_procs" } diff --git a/src/uu/seq/src/main.rs b/src/uu/seq/src/main.rs index c984ed61a..266ac5d11 100644 --- a/src/uu/seq/src/main.rs +++ b/src/uu/seq/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_seq); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_seq); diff --git a/src/uu/seq/src/seq.rs b/src/uu/seq/src/seq.rs index c3bba1c78..bdab044c5 100644 --- a/src/uu/seq/src/seq.rs +++ b/src/uu/seq/src/seq.rs @@ -7,8 +7,13 @@ extern crate uucore; use clap::{App, AppSettings, Arg}; +use num_bigint::BigInt; +use num_traits::One; +use num_traits::Zero; +use num_traits::{Num, ToPrimitive}; use std::cmp; use std::io::{stdout, Write}; +use std::str::FromStr; static VERSION: &str = env!("CARGO_PKG_VERSION"); static ABOUT: &str = "Display numbers from FIRST to LAST, in steps of INCREMENT."; @@ -29,25 +34,51 @@ fn get_usage() -> String { #[derive(Clone)] struct SeqOptions { separator: String, - terminator: Option, + terminator: String, widths: bool, } -fn parse_float(mut s: &str) -> Result { - if s.starts_with('+') { - s = &s[1..]; +enum Number { + BigInt(BigInt), + F64(f64), +} + +impl Number { + fn is_zero(&self) -> bool { + match self { + Number::BigInt(n) => n.is_zero(), + Number::F64(n) => n.is_zero(), + } } - match s.parse() { - Ok(n) => Ok(n), - Err(e) => Err(format!( - "seq: invalid floating point argument `{}`: {}", - s, e - )), + + fn into_f64(self) -> f64 { + match self { + // BigInt::to_f64() can not return None. + Number::BigInt(n) => n.to_f64().unwrap(), + Number::F64(n) => n, + } } } -fn escape_sequences(s: &str) -> String { - s.replace("\\n", "\n").replace("\\t", "\t") +impl FromStr for Number { + type Err = String; + /// Tries to parse this string as a BigInt, or if that fails as an f64. + fn from_str(mut s: &str) -> Result { + if s.starts_with('+') { + s = &s[1..]; + } + + match s.parse::() { + Ok(n) => Ok(Number::BigInt(n)), + Err(_) => match s.parse::() { + Ok(n) => Ok(Number::F64(n)), + Err(e) => Err(format!( + "seq: invalid floating point argument `{}`: {}", + s, e + )), + }, + } + } } pub fn uumain(args: impl uucore::Args) -> i32 { @@ -69,7 +100,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { Arg::with_name(OPT_TERMINATOR) .short("t") .long("terminator") - .help("Terminator character (defaults to separator)") + .help("Terminator character (defaults to \\n)") .takes_value(true) .number_of_values(1), ) @@ -84,20 +115,18 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .multiple(true) .takes_value(true) .allow_hyphen_values(true) - .max_values(3), + .max_values(3) + .required(true), ) .get_matches_from(args); let numbers = matches.values_of(ARG_NUMBERS).unwrap().collect::>(); - let mut options = SeqOptions { - separator: "\n".to_owned(), - terminator: None, - widths: false, + let options = SeqOptions { + separator: matches.value_of(OPT_SEPARATOR).unwrap_or("\n").to_string(), + terminator: matches.value_of(OPT_TERMINATOR).unwrap_or("\n").to_string(), + widths: matches.is_present(OPT_WIDTHS), }; - options.separator = matches.value_of(OPT_SEPARATOR).unwrap_or("\n").to_string(); - options.terminator = matches.value_of(OPT_TERMINATOR).map(String::from); - options.widths = matches.is_present(OPT_WIDTHS); let mut largest_dec = 0; let mut padding = 0; @@ -107,7 +136,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { let dec = slice.find('.').unwrap_or(len); largest_dec = len - dec; padding = dec; - match parse_float(slice) { + match slice.parse() { Ok(n) => n, Err(s) => { show_error!("{}", s); @@ -115,7 +144,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { } } } else { - 1.0 + Number::BigInt(BigInt::one()) }; let increment = if numbers.len() > 2 { let slice = numbers[1]; @@ -123,7 +152,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { let dec = slice.find('.').unwrap_or(len); largest_dec = cmp::max(largest_dec, len - dec); padding = cmp::max(padding, dec); - match parse_float(slice) { + match slice.parse() { Ok(n) => n, Err(s) => { show_error!("{}", s); @@ -131,16 +160,16 @@ pub fn uumain(args: impl uucore::Args) -> i32 { } } } else { - 1.0 + Number::BigInt(BigInt::one()) }; - if increment == 0.0 { + if increment.is_zero() { show_error!("increment value: '{}'", numbers[1]); return 1; } let last = { let slice = numbers[numbers.len() - 1]; padding = cmp::max(padding, slice.find('.').unwrap_or_else(|| slice.len())); - match parse_float(slice) { + match slice.parse::() { Ok(n) => n, Err(s) => { show_error!("{}", s); @@ -151,33 +180,42 @@ pub fn uumain(args: impl uucore::Args) -> i32 { if largest_dec > 0 { largest_dec -= 1; } - let separator = escape_sequences(&options.separator[..]); - let terminator = match options.terminator { - Some(term) => escape_sequences(&term[..]), - None => separator.clone(), - }; - print_seq( - first, - increment, - last, - largest_dec, - separator, - terminator, - options.widths, - padding, - ); + match (first, last, increment) { + (Number::BigInt(first), Number::BigInt(last), Number::BigInt(increment)) => { + print_seq_integers( + first, + increment, + last, + options.separator, + options.terminator, + options.widths, + padding, + ) + } + (first, last, increment) => print_seq( + first.into_f64(), + increment.into_f64(), + last.into_f64(), + largest_dec, + options.separator, + options.terminator, + options.widths, + padding, + ), + } 0 } -fn done_printing(next: f64, increment: f64, last: f64) -> bool { - if increment >= 0f64 { +fn done_printing(next: &T, increment: &T, last: &T) -> bool { + if increment >= &T::zero() { next > last } else { next < last } } +/// Floating point based code path #[allow(clippy::too_many_arguments)] fn print_seq( first: f64, @@ -191,7 +229,7 @@ fn print_seq( ) { let mut i = 0isize; let mut value = first + i as f64 * increment; - while !done_printing(value, increment, last) { + while !done_printing(&value, &increment, &last) { let istr = format!("{:.*}", largest_dec, value); let ilen = istr.len(); let before_dec = istr.find('.').unwrap_or(ilen); @@ -203,7 +241,7 @@ fn print_seq( print!("{}", istr); i += 1; value = first + i as f64 * increment; - if !done_printing(value, increment, last) { + if !done_printing(&value, &increment, &last) { print!("{}", separator); } } @@ -212,3 +250,33 @@ fn print_seq( } crash_if_err!(1, stdout().flush()); } + +/// BigInt based code path +fn print_seq_integers( + first: BigInt, + increment: BigInt, + last: BigInt, + separator: String, + terminator: String, + pad: bool, + padding: usize, +) { + let mut value = first; + let mut is_first_iteration = true; + while !done_printing(&value, &increment, &last) { + if !is_first_iteration { + print!("{}", separator); + } + is_first_iteration = false; + if pad { + print!("{number:>0width$}", number = value, width = padding); + } else { + print!("{}", value); + } + value += &increment; + } + + if !is_first_iteration { + print!("{}", terminator); + } +} diff --git a/src/uu/shred/src/main.rs b/src/uu/shred/src/main.rs index 2880499eb..ea7a42f65 100644 --- a/src/uu/shred/src/main.rs +++ b/src/uu/shred/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_shred); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_shred); diff --git a/src/uu/shred/src/shred.rs b/src/uu/shred/src/shred.rs index 15a4eff26..e371ad6b2 100644 --- a/src/uu/shred/src/shred.rs +++ b/src/uu/shred/src/shred.rs @@ -6,7 +6,7 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. -// spell-checker:ignore (ToDO) NAMESET FILESIZE fstab coeff journaling writeback REiser journaled +// spell-checker:ignore (words) writeback wipesync use clap::{App, Arg}; use rand::{Rng, ThreadRng}; @@ -25,7 +25,7 @@ extern crate uucore; static NAME: &str = "shred"; static VERSION_STR: &str = "1.0.0"; const BLOCK_SIZE: usize = 512; -const NAMESET: &str = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_."; +const NAME_CHARSET: &str = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_."; // Patterns as shown in the GNU coreutils shred implementation const PATTERNS: [&[u8]; 22] = [ @@ -59,10 +59,10 @@ enum PassType<'a> { Random, } -// Used to generate all possible filenames of a certain length using NAMESET as an alphabet +// Used to generate all possible filenames of a certain length using NAME_CHARSET as an alphabet struct FilenameGenerator { name_len: usize, - nameset_indices: RefCell>, // Store the indices of the letters of our filename in NAMESET + name_charset_indices: RefCell>, // Store the indices of the letters of our filename in NAME_CHARSET exhausted: Cell, } @@ -71,7 +71,7 @@ impl FilenameGenerator { let indices: Vec = vec![0; name_len]; FilenameGenerator { name_len, - nameset_indices: RefCell::new(indices), + name_charset_indices: RefCell::new(indices), exhausted: Cell::new(false), } } @@ -85,25 +85,25 @@ impl Iterator for FilenameGenerator { return None; } - let mut nameset_indices = self.nameset_indices.borrow_mut(); + let mut name_charset_indices = self.name_charset_indices.borrow_mut(); // Make the return value, then increment let mut ret = String::new(); - for i in nameset_indices.iter() { - let c: char = NAMESET.chars().nth(*i).unwrap(); + for i in name_charset_indices.iter() { + let c: char = NAME_CHARSET.chars().nth(*i).unwrap(); ret.push(c); } - if nameset_indices[0] == NAMESET.len() - 1 { + if name_charset_indices[0] == NAME_CHARSET.len() - 1 { self.exhausted.set(true) } // Now increment the least significant index for i in (0..self.name_len).rev() { - if nameset_indices[i] == NAMESET.len() - 1 { - nameset_indices[i] = 0; // Carry the 1 + if name_charset_indices[i] == NAME_CHARSET.len() - 1 { + name_charset_indices[i] = 0; // Carry the 1 continue; } else { - nameset_indices[i] += 1; + name_charset_indices[i] += 1; break; } } @@ -233,7 +233,7 @@ static AFTER_HELP: &str = assumption. The following are examples of file systems on which shred is\n\ not effective, or is not guaranteed to be effective in all file system modes:\n\ \n\ - * log-structured or journaled file systems, such as those supplied with\n\ + * log-structured or journal file systems, such as those supplied with\n\ AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)\n\ \n\ * file systems that write redundant data and carry on even if some writes\n\ @@ -250,7 +250,7 @@ static AFTER_HELP: &str = and shred is thus of limited effectiveness) only in data=journal mode,\n\ which journals file data in addition to just metadata. In both the\n\ data=ordered (default) and data=writeback modes, shred works as usual.\n\ - Ext3 journaling modes can be changed by adding the data=something option\n\ + Ext3 journal modes can be changed by adding the data=something option\n\ to the mount options for a particular file system in the /etc/fstab file,\n\ as documented in the mount man page (man mount).\n\ \n\ @@ -412,7 +412,7 @@ fn get_size(size_str_opt: Option) -> Option { _ => 1u64, }; - let coeff = match size_str.parse::() { + let coefficient = match size_str.parse::() { Ok(u) => u, Err(_) => { println!("{}: {}: Invalid file size", NAME, size_str_opt.unwrap()); @@ -420,7 +420,7 @@ fn get_size(size_str_opt: Option) -> Option { } }; - Some(coeff * unit) + Some(coefficient * unit) } fn pass_name(pass_type: PassType) -> String { diff --git a/src/uu/shuf/src/main.rs b/src/uu/shuf/src/main.rs index 1ecff5d21..fc6e2b4ae 100644 --- a/src/uu/shuf/src/main.rs +++ b/src/uu/shuf/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_shuf); // spell-checker:ignore procs uucore shuf +uucore_procs::main!(uu_shuf); diff --git a/src/uu/sleep/src/main.rs b/src/uu/sleep/src/main.rs index 46ecd0969..16c3100aa 100644 --- a/src/uu/sleep/src/main.rs +++ b/src/uu/sleep/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_sleep); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_sleep); diff --git a/src/uu/sort/BENCHMARKING.md b/src/uu/sort/BENCHMARKING.md index 560d6b438..77186318a 100644 --- a/src/uu/sort/BENCHMARKING.md +++ b/src/uu/sort/BENCHMARKING.md @@ -1,5 +1,7 @@ # Benchmarking sort + + Most of the time when sorting is spent comparing lines. The comparison functions however differ based on which arguments are passed to `sort`, therefore it is important to always benchmark multiple scenarios. This is an overview over what was benchmarked, and if you make changes to `sort`, you are encouraged to check @@ -96,7 +98,7 @@ When invoked with -c, we simply check if the input is already ordered. The input Try to run the above benchmarks by piping the input through stdin (standard input) and redirect the output through stdout (standard output): -- Remove the input file from the arguments and add `cat [inputfile] | ` at the beginning. +- Remove the input file from the arguments and add `cat [input_file] | ` at the beginning. - Remove `-o output.txt` and add `> output.txt` at the end. Example: `hyperfine "target/release/coreutils sort shuffled_numbers.txt -n -o output.txt"` becomes diff --git a/src/uu/sort/src/main.rs b/src/uu/sort/src/main.rs index a59375b2f..ab463776d 100644 --- a/src/uu/sort/src/main.rs +++ b/src/uu/sort/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_sort); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_sort); diff --git a/src/uu/sort/src/sort.rs b/src/uu/sort/src/sort.rs index a3b79e5d7..ab3b06451 100644 --- a/src/uu/sort/src/sort.rs +++ b/src/uu/sort/src/sort.rs @@ -11,7 +11,8 @@ // https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sort.html // https://www.gnu.org/software/coreutils/manual/html_node/sort-invocation.html -// spell-checker:ignore (ToDO) outfile nondictionary +// spell-checker:ignore (misc) HFKJFK Mbdfhn + #[macro_use] extern crate uucore; @@ -143,7 +144,7 @@ pub struct GlobalSettings { ignore_non_printing: bool, merge: bool, reverse: bool, - outfile: Option, + output_file: Option, stable: bool, unique: bool, check: bool, @@ -187,7 +188,7 @@ impl GlobalSettings { } fn out_writer(&self) -> BufWriter> { - match self.outfile { + match self.output_file { Some(ref filename) => match File::create(Path::new(&filename)) { Ok(f) => BufWriter::new(Box::new(f) as Box), Err(e) => { @@ -211,7 +212,7 @@ impl Default for GlobalSettings { ignore_non_printing: false, merge: false, reverse: false, - outfile: None, + output_file: None, stable: false, unique: false, check: false, @@ -1168,7 +1169,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { settings.ignore_blanks = matches.is_present(OPT_IGNORE_BLANKS); - settings.outfile = matches.value_of(OPT_OUTPUT).map(String::from); + settings.output_file = matches.value_of(OPT_OUTPUT).map(String::from); settings.reverse = matches.is_present(OPT_REVERSE); settings.stable = matches.is_present(OPT_STABLE); settings.unique = matches.is_present(OPT_UNIQUE); diff --git a/src/uu/split/src/main.rs b/src/uu/split/src/main.rs index 2f0640db4..87f15f529 100644 --- a/src/uu/split/src/main.rs +++ b/src/uu/split/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_split); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_split); diff --git a/src/uu/split/src/split.rs b/src/uu/split/src/split.rs index 39bd577cb..85ed5f183 100644 --- a/src/uu/split/src/split.rs +++ b/src/uu/split/src/split.rs @@ -157,13 +157,13 @@ pub fn uumain(args: impl uucore::Args) -> i32 { settings.verbose = matches.occurrences_of("verbose") > 0; // check that the user is not specifying more than one strategy - // note: right now, this exact behaviour cannot be handled by ArgGroup since ArgGroup + // note: right now, this exact behavior cannot be handled by ArgGroup since ArgGroup // considers a default value Arg as "defined" let explicit_strategies = vec![OPT_LINE_BYTES, OPT_LINES, OPT_BYTES] .into_iter() - .fold(0, |count, strat| { - if matches.occurrences_of(strat) > 0 { + .fold(0, |count, strategy| { + if matches.occurrences_of(strategy) > 0 { count + 1 } else { count @@ -177,10 +177,10 @@ pub fn uumain(args: impl uucore::Args) -> i32 { settings.strategy = String::from(OPT_LINES); settings.strategy_param = matches.value_of(OPT_LINES).unwrap().to_owned(); // take any (other) defined strategy - for strat in vec![OPT_LINE_BYTES, OPT_BYTES].into_iter() { - if matches.occurrences_of(strat) > 0 { - settings.strategy = String::from(strat); - settings.strategy_param = matches.value_of(strat).unwrap().to_owned(); + for strategy in vec![OPT_LINE_BYTES, OPT_BYTES].into_iter() { + if matches.occurrences_of(strategy) > 0 { + settings.strategy = String::from(strategy); + settings.strategy_param = matches.value_of(strategy).unwrap().to_owned(); } } diff --git a/src/uu/stat/src/main.rs b/src/uu/stat/src/main.rs index 6e483c850..839eff7de 100644 --- a/src/uu/stat/src/main.rs +++ b/src/uu/stat/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_stat); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_stat); diff --git a/src/uu/stat/src/stat.rs b/src/uu/stat/src/stat.rs index 582d59841..403134b4b 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -5,8 +5,6 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// spell-checker:ignore (ToDO) showfs otype fmtstr prec ftype blocksize nlink rdev fnodes fsid namelen blksize inodes fstype iosize statfs gnulib NBLOCKSIZE - #[macro_use] extern crate uucore; use uucore::entries; @@ -208,7 +206,7 @@ pub fn group_num(s: &str) -> Cow { pub struct Stater { follow: bool, - showfs: bool, + show_fs: bool, from_user: bool, files: Vec, mount_list: Option>, @@ -217,7 +215,7 @@ pub struct Stater { } #[allow(clippy::cognitive_complexity)] -fn print_it(arg: &str, otype: OutputType, flag: u8, width: usize, precision: i32) { +fn print_it(arg: &str, output_type: OutputType, flag: u8, width: usize, precision: i32) { // If the precision is given as just '.', the precision is taken to be zero. // A negative precision is taken as if the precision were omitted. // This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, @@ -248,7 +246,7 @@ fn print_it(arg: &str, otype: OutputType, flag: u8, width: usize, precision: i32 // By default, a sign is used only for negative numbers. // A + overrides a space if both are used. - if otype == OutputType::Unknown { + if output_type == OutputType::Unknown { return print!("?"); } @@ -262,7 +260,7 @@ fn print_it(arg: &str, otype: OutputType, flag: u8, width: usize, precision: i32 let has_sign = has!(flag, F_SIGN) || has!(flag, F_SPACE); let should_alter = has!(flag, F_ALTER); - let prefix = match otype { + let prefix = match output_type { OutputType::UnsignedOct => "0", OutputType::UnsignedHex => "0x", OutputType::Integer => { @@ -275,7 +273,7 @@ fn print_it(arg: &str, otype: OutputType, flag: u8, width: usize, precision: i32 _ => "", }; - match otype { + match output_type { OutputType::Str => { let limit = cmp::min(precision, arg.len() as i32); let s: &str = if limit >= 0 { @@ -334,10 +332,10 @@ fn print_it(arg: &str, otype: OutputType, flag: u8, width: usize, precision: i32 } impl Stater { - pub fn generate_tokens(fmtstr: &str, use_printf: bool) -> Result, String> { + pub fn generate_tokens(format_str: &str, use_printf: bool) -> Result, String> { let mut tokens = Vec::new(); - let bound = fmtstr.len(); - let chars = fmtstr.chars().collect::>(); + let bound = format_str.len(); + let chars = format_str.chars().collect::>(); let mut i = 0_usize; while i < bound { match chars[i] { @@ -370,32 +368,32 @@ impl Stater { } i += 1; } - check_bound!(fmtstr, bound, old, i); + check_bound!(format_str, bound, old, i); let mut width = 0_usize; let mut precision = -1_i32; let mut j = i; - if let Some((field_width, offset)) = fmtstr[j..].scan_num::() { + if let Some((field_width, offset)) = format_str[j..].scan_num::() { width = field_width; j += offset; } - check_bound!(fmtstr, bound, old, j); + check_bound!(format_str, bound, old, j); if chars[j] == '.' { j += 1; - check_bound!(fmtstr, bound, old, j); + check_bound!(format_str, bound, old, j); - match fmtstr[j..].scan_num::() { - Some((prec, offset)) => { - if prec >= 0 { - precision = prec; + match format_str[j..].scan_num::() { + Some((value, offset)) => { + if value >= 0 { + precision = value; } j += offset; } None => precision = 0, } - check_bound!(fmtstr, bound, old, j); + check_bound!(format_str, bound, old, j); } i = j; @@ -418,7 +416,7 @@ impl Stater { } match chars[i] { 'x' if i + 1 < bound => { - if let Some((c, offset)) = fmtstr[i + 1..].scan_char(16) { + if let Some((c, offset)) = format_str[i + 1..].scan_char(16) { tokens.push(Token::Char(c)); i += offset; } else { @@ -427,7 +425,7 @@ impl Stater { } } '0'..='7' => { - let (c, offset) = fmtstr[i..].scan_char(8).unwrap(); + let (c, offset) = format_str[i..].scan_char(8).unwrap(); tokens.push(Token::Char(c)); i += offset - 1; } @@ -452,7 +450,7 @@ impl Stater { } i += 1; } - if !use_printf && !fmtstr.ends_with('\n') { + if !use_printf && !format_str.ends_with('\n') { tokens.push(Token::Char('\n')); } Ok(tokens) @@ -464,7 +462,7 @@ impl Stater { .map(|v| v.map(ToString::to_string).collect()) .unwrap_or_default(); - let fmtstr = if matches.is_present(options::PRINTF) { + let format_str = if matches.is_present(options::PRINTF) { matches .value_of(options::PRINTF) .expect("Invalid format string") @@ -474,17 +472,19 @@ impl Stater { let use_printf = matches.is_present(options::PRINTF); let terse = matches.is_present(options::TERSE); - let showfs = matches.is_present(options::FILE_SYSTEM); + let show_fs = matches.is_present(options::FILE_SYSTEM); - let default_tokens = if fmtstr.is_empty() { - Stater::generate_tokens(&Stater::default_fmt(showfs, terse, false), use_printf).unwrap() + let default_tokens = if format_str.is_empty() { + Stater::generate_tokens(&Stater::default_format(show_fs, terse, false), use_printf) + .unwrap() } else { - Stater::generate_tokens(&fmtstr, use_printf)? + Stater::generate_tokens(&format_str, use_printf)? }; let default_dev_tokens = - Stater::generate_tokens(&Stater::default_fmt(showfs, terse, true), use_printf).unwrap(); + Stater::generate_tokens(&Stater::default_format(show_fs, terse, true), use_printf) + .unwrap(); - let mount_list = if showfs { + let mount_list = if show_fs { // mount points aren't displayed when showing filesystem information None } else { @@ -500,8 +500,8 @@ impl Stater { Ok(Stater { follow: matches.is_present(options::DEREFERENCE), - showfs, - from_user: !fmtstr.is_empty(), + show_fs, + from_user: !format_str.is_empty(), files, default_tokens, default_dev_tokens, @@ -533,7 +533,7 @@ impl Stater { } fn do_stat(&self, file: &str) -> i32 { - if !self.showfs { + if !self.show_fs { let result = if self.follow { fs::metadata(file) } else { @@ -541,13 +541,14 @@ impl Stater { }; match result { Ok(meta) => { - let ftype = meta.file_type(); - let tokens = - if self.from_user || !(ftype.is_char_device() || ftype.is_block_device()) { - &self.default_tokens - } else { - &self.default_dev_tokens - }; + let file_type = meta.file_type(); + let tokens = if self.from_user + || !(file_type.is_char_device() || file_type.is_block_device()) + { + &self.default_tokens + } else { + &self.default_dev_tokens + }; for t in tokens.iter() { match *t { @@ -559,91 +560,91 @@ impl Stater { format, } => { let arg: String; - let otype: OutputType; + let output_type: OutputType; match format { // access rights in octal 'a' => { arg = format!("{:o}", 0o7777 & meta.mode()); - otype = OutputType::UnsignedOct; + output_type = OutputType::UnsignedOct; } // access rights in human readable form 'A' => { arg = display_permissions(&meta, true); - otype = OutputType::Str; + output_type = OutputType::Str; } // number of blocks allocated (see %B) 'b' => { arg = format!("{}", meta.blocks()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // the size in bytes of each block reported by %b // FIXME: blocksize differs on various platform - // See coreutils/gnulib/lib/stat-size.h ST_NBLOCKSIZE + // See coreutils/gnulib/lib/stat-size.h ST_NBLOCKSIZE // spell-checker:disable-line 'B' => { // the size in bytes of each block reported by %b arg = format!("{}", 512); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // device number in decimal 'd' => { arg = format!("{}", meta.dev()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // device number in hex 'D' => { arg = format!("{:x}", meta.dev()); - otype = OutputType::UnsignedHex; + output_type = OutputType::UnsignedHex; } // raw mode in hex 'f' => { arg = format!("{:x}", meta.mode()); - otype = OutputType::UnsignedHex; + output_type = OutputType::UnsignedHex; } // file type 'F' => { arg = pretty_filetype(meta.mode() as mode_t, meta.len()) .to_owned(); - otype = OutputType::Str; + output_type = OutputType::Str; } // group ID of owner 'g' => { arg = format!("{}", meta.gid()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // group name of owner 'G' => { arg = entries::gid2grp(meta.gid()) .unwrap_or_else(|_| "UNKNOWN".to_owned()); - otype = OutputType::Str; + output_type = OutputType::Str; } // number of hard links 'h' => { arg = format!("{}", meta.nlink()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // inode number 'i' => { arg = format!("{}", meta.ino()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // mount point 'm' => { arg = self.find_mount_point(file).unwrap(); - otype = OutputType::Str; + output_type = OutputType::Str; } // file name 'n' => { arg = file.to_owned(); - otype = OutputType::Str; + output_type = OutputType::Str; } // quoted file name with dereference if symbolic link 'N' => { - if ftype.is_symlink() { + if file_type.is_symlink() { let dst = match fs::read_link(file) { Ok(path) => path, Err(e) => { @@ -659,91 +660,91 @@ impl Stater { } else { arg = file.to_string(); } - otype = OutputType::Str; + output_type = OutputType::Str; } // optimal I/O transfer size hint 'o' => { arg = format!("{}", meta.blksize()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // total size, in bytes 's' => { arg = format!("{}", meta.len()); - otype = OutputType::Integer; + output_type = OutputType::Integer; } // major device type in hex, for character/block device special // files 't' => { arg = format!("{:x}", meta.rdev() >> 8); - otype = OutputType::UnsignedHex; + output_type = OutputType::UnsignedHex; } // minor device type in hex, for character/block device special // files 'T' => { arg = format!("{:x}", meta.rdev() & 0xff); - otype = OutputType::UnsignedHex; + output_type = OutputType::UnsignedHex; } // user ID of owner 'u' => { arg = format!("{}", meta.uid()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // user name of owner 'U' => { arg = entries::uid2usr(meta.uid()) .unwrap_or_else(|_| "UNKNOWN".to_owned()); - otype = OutputType::Str; + output_type = OutputType::Str; } // time of file birth, human-readable; - if unknown 'w' => { arg = meta.pretty_birth(); - otype = OutputType::Str; + output_type = OutputType::Str; } // time of file birth, seconds since Epoch; 0 if unknown 'W' => { arg = meta.birth(); - otype = OutputType::Integer; + output_type = OutputType::Integer; } // time of last access, human-readable 'x' => { arg = pretty_time(meta.atime(), meta.atime_nsec()); - otype = OutputType::Str; + output_type = OutputType::Str; } // time of last access, seconds since Epoch 'X' => { arg = format!("{}", meta.atime()); - otype = OutputType::Integer; + output_type = OutputType::Integer; } // time of last data modification, human-readable 'y' => { arg = pretty_time(meta.mtime(), meta.mtime_nsec()); - otype = OutputType::Str; + output_type = OutputType::Str; } // time of last data modification, seconds since Epoch 'Y' => { arg = format!("{}", meta.mtime()); - otype = OutputType::Str; + output_type = OutputType::Str; } // time of last status change, human-readable 'z' => { arg = pretty_time(meta.ctime(), meta.ctime_nsec()); - otype = OutputType::Str; + output_type = OutputType::Str; } // time of last status change, seconds since Epoch 'Z' => { arg = format!("{}", meta.ctime()); - otype = OutputType::Integer; + output_type = OutputType::Integer; } _ => { arg = "?".to_owned(); - otype = OutputType::Unknown; + output_type = OutputType::Unknown; } } - print_it(&arg, otype, flag, width, precision); + print_it(&arg, output_type, flag, width, precision); } } } @@ -768,75 +769,75 @@ impl Stater { format, } => { let arg: String; - let otype: OutputType; + let output_type: OutputType; match format { // free blocks available to non-superuser 'a' => { arg = format!("{}", meta.avail_blocks()); - otype = OutputType::Integer; + output_type = OutputType::Integer; } // total data blocks in file system 'b' => { arg = format!("{}", meta.total_blocks()); - otype = OutputType::Integer; + output_type = OutputType::Integer; } // total file nodes in file system 'c' => { - arg = format!("{}", meta.total_fnodes()); - otype = OutputType::Unsigned; + arg = format!("{}", meta.total_file_nodes()); + output_type = OutputType::Unsigned; } // free file nodes in file system 'd' => { - arg = format!("{}", meta.free_fnodes()); - otype = OutputType::Integer; + arg = format!("{}", meta.free_file_nodes()); + output_type = OutputType::Integer; } // free blocks in file system 'f' => { arg = format!("{}", meta.free_blocks()); - otype = OutputType::Integer; + output_type = OutputType::Integer; } // file system ID in hex 'i' => { arg = format!("{:x}", meta.fsid()); - otype = OutputType::UnsignedHex; + output_type = OutputType::UnsignedHex; } // maximum length of filenames 'l' => { arg = format!("{}", meta.namelen()); - otype = OutputType::Unsigned; + output_type = OutputType::Unsigned; } // file name 'n' => { arg = file.to_owned(); - otype = OutputType::Str; + output_type = OutputType::Str; } // block size (for faster transfers) 's' => { - arg = format!("{}", meta.iosize()); - otype = OutputType::Unsigned; + arg = format!("{}", meta.io_size()); + output_type = OutputType::Unsigned; } // fundamental block size (for block counts) 'S' => { - arg = format!("{}", meta.blksize()); - otype = OutputType::Unsigned; + arg = format!("{}", meta.block_size()); + output_type = OutputType::Unsigned; } // file system type in hex 't' => { arg = format!("{:x}", meta.fs_type()); - otype = OutputType::UnsignedHex; + output_type = OutputType::UnsignedHex; } // file system type in human readable form 'T' => { arg = pretty_fstype(meta.fs_type()).into_owned(); - otype = OutputType::Str; + output_type = OutputType::Str; } _ => { arg = "?".to_owned(); - otype = OutputType::Unknown; + output_type = OutputType::Unknown; } } - print_it(&arg, otype, flag, width, precision); + print_it(&arg, output_type, flag, width, precision); } } } @@ -850,34 +851,34 @@ impl Stater { 0 } - // taken from coreutils/src/stat.c - fn default_fmt(showfs: bool, terse: bool, dev: bool) -> String { + fn default_format(show_fs: bool, terse: bool, show_dev_type: bool) -> String { // SELinux related format is *ignored* - let mut fmtstr = String::with_capacity(36); - if showfs { + let mut format_str = String::with_capacity(36); + if show_fs { if terse { - fmtstr.push_str("%n %i %l %t %s %S %b %f %a %c %d\n"); + format_str.push_str("%n %i %l %t %s %S %b %f %a %c %d\n"); } else { - fmtstr.push_str( + format_str.push_str( " File: \"%n\"\n ID: %-8i Namelen: %-7l Type: %T\nBlock \ size: %-10s Fundamental block size: %S\nBlocks: Total: %-10b \ Free: %-10f Available: %a\nInodes: Total: %-10c Free: %d\n", ); } } else if terse { - fmtstr.push_str("%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o\n"); + format_str.push_str("%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %W %o\n"); } else { - fmtstr.push_str(" File: %N\n Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"); - if dev { - fmtstr.push_str("Device: %Dh/%dd\tInode: %-10i Links: %-5h Device type: %t,%T\n"); + format_str.push_str(" File: %N\n Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"); + if show_dev_type { + format_str + .push_str("Device: %Dh/%dd\tInode: %-10i Links: %-5h Device type: %t,%T\n"); } else { - fmtstr.push_str("Device: %Dh/%dd\tInode: %-10i Links: %h\n"); + format_str.push_str("Device: %Dh/%dd\tInode: %-10i Links: %h\n"); } - fmtstr.push_str("Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n"); - fmtstr.push_str("Access: %x\nModify: %y\nChange: %z\n Birth: %w\n"); + format_str.push_str("Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n"); + format_str.push_str("Access: %x\nModify: %y\nChange: %z\n Birth: %w\n"); } - fmtstr + format_str } } diff --git a/src/uu/stdbuf/src/main.rs b/src/uu/stdbuf/src/main.rs index c020a7a07..1989a3b8d 100644 --- a/src/uu/stdbuf/src/main.rs +++ b/src/uu/stdbuf/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_stdbuf); // spell-checker:ignore procs uucore stdbuf +uucore_procs::main!(uu_stdbuf); diff --git a/src/uu/sum/src/main.rs b/src/uu/sum/src/main.rs index 64b0d4254..85f4d0079 100644 --- a/src/uu/sum/src/main.rs +++ b/src/uu/sum/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_sum); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_sum); diff --git a/src/uu/sum/src/sum.rs b/src/uu/sum/src/sum.rs index ea833c0d2..95de707fa 100644 --- a/src/uu/sum/src/sum.rs +++ b/src/uu/sum/src/sum.rs @@ -108,13 +108,13 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .arg( Arg::with_name(options::BSD_COMPATIBLE) .short(options::BSD_COMPATIBLE) - .help("use the BSD compatible algorithm (default)"), + .help("use the BSD sum algorithm, use 1K blocks (default)"), ) .arg( Arg::with_name(options::SYSTEM_V_COMPATIBLE) .short("s") .long(options::SYSTEM_V_COMPATIBLE) - .help("use the BSD compatible algorithm (default)"), + .help("use System V sum algorithm, use 512 bytes blocks"), ) .get_matches_from(args); diff --git a/src/uu/sync/src/main.rs b/src/uu/sync/src/main.rs index 06d85b278..9786fc371 100644 --- a/src/uu/sync/src/main.rs +++ b/src/uu/sync/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_sync); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_sync); diff --git a/src/uu/tac/src/main.rs b/src/uu/tac/src/main.rs index 93d91e2b7..018821c73 100644 --- a/src/uu/tac/src/main.rs +++ b/src/uu/tac/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_tac); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_tac); diff --git a/src/uu/tail/README.md b/src/uu/tail/README.md index 53936a609..b7f92f8e4 100644 --- a/src/uu/tail/README.md +++ b/src/uu/tail/README.md @@ -2,17 +2,17 @@ - Rudimentary tail implementation. -## Missing features: +## Missing features ### Flags with features -* [ ] `--max-unchanged-stats` : with `--follow=name`, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files). With inotify, this option is rarely useful. -* [ ] `--retry` : keep trying to open a file even when it is or becomes inaccessible; useful when follow‐ing by name, i.e., with `--follow=name` +- [ ] `--max-unchanged-stats` : with `--follow=name`, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files). With `inotify`, this option is rarely useful. +- [ ] `--retry` : keep trying to open a file even when it is or becomes inaccessible; useful when follow‐ing by name, i.e., with `--follow=name` ### Others - [ ] The current implementation does not handle `-` as an alias for stdin. -## Possible optimizations: +## Possible optimizations -* [ ] Don't read the whole file if not using `-f` and input is regular file. Read in chunks from the end going backwards, reading each individual chunk forward. +- [ ] Don't read the whole file if not using `-f` and input is regular file. Read in chunks from the end going backwards, reading each individual chunk forward. diff --git a/src/uu/tail/src/main.rs b/src/uu/tail/src/main.rs index 52818fad6..dd89ce2c7 100644 --- a/src/uu/tail/src/main.rs +++ b/src/uu/tail/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_tail); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_tail); diff --git a/src/uu/tee/src/main.rs b/src/uu/tee/src/main.rs index 1314f353e..2b483d9d8 100644 --- a/src/uu/tee/src/main.rs +++ b/src/uu/tee/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_tee); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_tee); diff --git a/src/uu/tee/src/tee.rs b/src/uu/tee/src/tee.rs index c21559b3b..82a06daa2 100644 --- a/src/uu/tee/src/tee.rs +++ b/src/uu/tee/src/tee.rs @@ -119,7 +119,7 @@ fn tee(options: Options) -> Result<()> { // TODO: replaced generic 'copy' call to be able to stop copying // if all outputs are closed (due to errors) - if copy(input, &mut output).is_err() || output.flush().is_err() || output.error_occured() { + if copy(input, &mut output).is_err() || output.flush().is_err() || output.error_occurred() { Err(Error::new(ErrorKind::Other, "")) } else { Ok(()) @@ -155,7 +155,7 @@ impl MultiWriter { writers, } } - fn error_occured(&self) -> bool { + fn error_occurred(&self) -> bool { self.writers.len() != self.initial_len } } diff --git a/src/uu/test/src/main.rs b/src/uu/test/src/main.rs index 5018a5c8c..9f4e6985f 100644 --- a/src/uu/test/src/main.rs +++ b/src/uu/test/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_test); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_test); diff --git a/src/uu/test/src/parser.rs b/src/uu/test/src/parser.rs index a77bfabb3..d4302bd67 100644 --- a/src/uu/test/src/parser.rs +++ b/src/uu/test/src/parser.rs @@ -5,6 +5,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +// spell-checker:ignore (grammar) BOOLOP STRLEN FILETEST FILEOP INTOP STRINGOP ; (vars) LParen StrlenOp + use std::ffi::OsString; use std::iter::Peekable; diff --git a/src/uu/test/src/test.rs b/src/uu/test/src/test.rs index 86950ecc2..acf0f7eca 100644 --- a/src/uu/test/src/test.rs +++ b/src/uu/test/src/test.rs @@ -6,7 +6,7 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -// spell-checker:ignore (ToDO) retval paren prec subprec cond +// spell-checker:ignore (vars) FiletestOp StrlenOp mod parser; @@ -122,7 +122,7 @@ fn eval(stack: &mut Vec) -> Result { } } -fn integers(a: &OsStr, b: &OsStr, cond: &OsStr) -> Result { +fn integers(a: &OsStr, b: &OsStr, op: &OsStr) -> Result { let format_err = |value| format!("invalid integer ‘{}’", value); let a = a.to_string_lossy(); @@ -131,15 +131,15 @@ fn integers(a: &OsStr, b: &OsStr, cond: &OsStr) -> Result { let b = b.to_string_lossy(); let b: i64 = b.parse().map_err(|_| format_err(b))?; - let cond = cond.to_string_lossy(); - Ok(match cond.as_ref() { + let operator = op.to_string_lossy(); + Ok(match operator.as_ref() { "-eq" => a == b, "-ne" => a != b, "-gt" => a > b, "-ge" => a >= b, "-lt" => a < b, "-le" => a <= b, - _ => return Err(format!("unknown operator ‘{}’", cond)), + _ => return Err(format!("unknown operator ‘{}’", operator)), }) } @@ -177,7 +177,7 @@ enum PathCondition { } #[cfg(not(windows))] -fn path(path: &OsStr, cond: PathCondition) -> bool { +fn path(path: &OsStr, condition: PathCondition) -> bool { use std::fs::{self, Metadata}; use std::os::unix::fs::{FileTypeExt, MetadataExt}; @@ -208,7 +208,7 @@ fn path(path: &OsStr, cond: PathCondition) -> bool { } }; - let metadata = if cond == PathCondition::SymLink { + let metadata = if condition == PathCondition::SymLink { fs::symlink_metadata(path) } else { fs::metadata(path) @@ -223,7 +223,7 @@ fn path(path: &OsStr, cond: PathCondition) -> bool { let file_type = metadata.file_type(); - match cond { + match condition { PathCondition::BlockSpecial => file_type.is_block_device(), PathCondition::CharacterSpecial => file_type.is_char_device(), PathCondition::Directory => file_type.is_dir(), @@ -242,7 +242,7 @@ fn path(path: &OsStr, cond: PathCondition) -> bool { } #[cfg(windows)] -fn path(path: &OsStr, cond: PathCondition) -> bool { +fn path(path: &OsStr, condition: PathCondition) -> bool { use std::fs::metadata; let stat = match metadata(path) { @@ -250,7 +250,7 @@ fn path(path: &OsStr, cond: PathCondition) -> bool { _ => return false, }; - match cond { + match condition { PathCondition::BlockSpecial => false, PathCondition::CharacterSpecial => false, PathCondition::Directory => stat.is_dir(), diff --git a/src/uu/timeout/src/main.rs b/src/uu/timeout/src/main.rs index 20c4271d9..2479f91c1 100644 --- a/src/uu/timeout/src/main.rs +++ b/src/uu/timeout/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_timeout); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_timeout); diff --git a/src/uu/timeout/src/timeout.rs b/src/uu/timeout/src/timeout.rs index 7d557f1ce..dc8979143 100644 --- a/src/uu/timeout/src/timeout.rs +++ b/src/uu/timeout/src/timeout.rs @@ -159,8 +159,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { ) } -/// TODO: Improve exit codes, and make them consistent with the GNU Coreutil -/// exit codes. +/// TODO: Improve exit codes, and make them consistent with the GNU Coreutils exit codes. fn timeout( cmdname: &str, diff --git a/src/uu/touch/src/main.rs b/src/uu/touch/src/main.rs index bad67efd4..e8a2729a2 100644 --- a/src/uu/touch/src/main.rs +++ b/src/uu/touch/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_touch); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_touch); diff --git a/src/uu/touch/src/touch.rs b/src/uu/touch/src/touch.rs index 00b936e55..b76e04b7a 100644 --- a/src/uu/touch/src/touch.rs +++ b/src/uu/touch/src/touch.rs @@ -238,10 +238,14 @@ fn parse_date(str: &str) -> FileTime { // be any simple specification for what format this parameter allows and I'm // not about to implement GNU parse_datetime. // http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/parse-datetime.y - match time::strptime(str, "%c") { - Ok(tm) => local_tm_to_filetime(to_local(tm)), - Err(e) => panic!("Unable to parse date\n{}", e), + let formats = vec!["%c", "%F"]; + for f in formats { + if let Ok(tm) = time::strptime(str, f) { + return local_tm_to_filetime(to_local(tm)); + } } + show_error!("Unable to parse date: {}\n", str); + process::exit(1); } fn parse_timestamp(s: &str) -> FileTime { diff --git a/src/uu/tr/src/main.rs b/src/uu/tr/src/main.rs index 8bed990e5..9118c3628 100644 --- a/src/uu/tr/src/main.rs +++ b/src/uu/tr/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_tr); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_tr); diff --git a/src/uu/true/src/main.rs b/src/uu/true/src/main.rs index 7e009be8a..b30f4d4cb 100644 --- a/src/uu/true/src/main.rs +++ b/src/uu/true/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_true); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_true); diff --git a/src/uu/truncate/src/main.rs b/src/uu/truncate/src/main.rs index 91fe70b6d..46e65faea 100644 --- a/src/uu/truncate/src/main.rs +++ b/src/uu/truncate/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_truncate); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_truncate); diff --git a/src/uu/truncate/src/truncate.rs b/src/uu/truncate/src/truncate.rs index cada97126..79aa4f3f1 100644 --- a/src/uu/truncate/src/truncate.rs +++ b/src/uu/truncate/src/truncate.rs @@ -42,13 +42,13 @@ impl TruncateMode { /// ``` fn to_size(&self, fsize: usize) -> usize { match self { - TruncateMode::Absolute(modsize) => *modsize, - TruncateMode::Extend(modsize) => fsize + modsize, - TruncateMode::Reduce(modsize) => fsize - modsize, - TruncateMode::AtMost(modsize) => fsize.min(*modsize), - TruncateMode::AtLeast(modsize) => fsize.max(*modsize), - TruncateMode::RoundDown(modsize) => fsize - fsize % modsize, - TruncateMode::RoundUp(modsize) => fsize + fsize % modsize, + TruncateMode::Absolute(size) => *size, + TruncateMode::Extend(size) => fsize + size, + TruncateMode::Reduce(size) => fsize - size, + TruncateMode::AtMost(size) => fsize.min(*size), + TruncateMode::AtLeast(size) => fsize.max(*size), + TruncateMode::RoundDown(size) => fsize - fsize % size, + TruncateMode::RoundUp(size) => fsize + fsize % size, } } } diff --git a/src/uu/tsort/src/main.rs b/src/uu/tsort/src/main.rs index 6b108cc5e..0694678d4 100644 --- a/src/uu/tsort/src/main.rs +++ b/src/uu/tsort/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_tsort); // spell-checker:ignore procs uucore tsort +uucore_procs::main!(uu_tsort); diff --git a/src/uu/tty/src/main.rs b/src/uu/tty/src/main.rs index 8cb1cbb4b..01a01e5ca 100644 --- a/src/uu/tty/src/main.rs +++ b/src/uu/tty/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_tty); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_tty); diff --git a/src/uu/uname/src/main.rs b/src/uu/uname/src/main.rs index f40104670..5252f4716 100644 --- a/src/uu/uname/src/main.rs +++ b/src/uu/uname/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_uname); // spell-checker:ignore procs uucore uname +uucore_procs::main!(uu_uname); diff --git a/src/uu/unexpand/src/main.rs b/src/uu/unexpand/src/main.rs index 82d11dd95..2e7b1d967 100644 --- a/src/uu/unexpand/src/main.rs +++ b/src/uu/unexpand/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_unexpand); // spell-checker:ignore procs uucore unexpand +uucore_procs::main!(uu_unexpand); diff --git a/src/uu/uniq/src/main.rs b/src/uu/uniq/src/main.rs index dd4b6da1a..361c39f14 100644 --- a/src/uu/uniq/src/main.rs +++ b/src/uu/uniq/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_uniq); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_uniq); diff --git a/src/uu/unlink/src/main.rs b/src/uu/unlink/src/main.rs index f01b6bac3..b03d4a675 100644 --- a/src/uu/unlink/src/main.rs +++ b/src/uu/unlink/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_unlink); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_unlink); diff --git a/src/uu/uptime/src/main.rs b/src/uu/uptime/src/main.rs index 352703eb3..be5d5ab01 100644 --- a/src/uu/uptime/src/main.rs +++ b/src/uu/uptime/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_uptime); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_uptime); diff --git a/src/uu/users/src/main.rs b/src/uu/users/src/main.rs index f065c633c..f30a01ecb 100644 --- a/src/uu/users/src/main.rs +++ b/src/uu/users/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_users); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_users); diff --git a/src/uu/users/src/users.rs b/src/uu/users/src/users.rs index 99e06c1af..664ff55f3 100644 --- a/src/uu/users/src/users.rs +++ b/src/uu/users/src/users.rs @@ -6,6 +6,8 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. +// spell-checker:ignore (paths) wtmp + #[macro_use] extern crate uucore; diff --git a/src/uu/wc/src/main.rs b/src/uu/wc/src/main.rs index ce5629e51..b58b9cac7 100644 --- a/src/uu/wc/src/main.rs +++ b/src/uu/wc/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_wc); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_wc); diff --git a/src/uu/wc/src/wc.rs b/src/uu/wc/src/wc.rs index 6e95254ee..d990c6679 100644 --- a/src/uu/wc/src/wc.rs +++ b/src/uu/wc/src/wc.rs @@ -5,17 +5,15 @@ // * For the full copyright and license information, please view the LICENSE // * file that was distributed with this source code. -// spell-checker:ignore (ToDO) fpath - #[macro_use] extern crate uucore; mod count_bytes; mod countable; -mod wordcount; +mod word_count; use count_bytes::count_bytes_fast; use countable::WordCountable; -use wordcount::{TitledWordCount, WordCount}; +use word_count::{TitledWordCount, WordCount}; use clap::{App, Arg, ArgMatches}; use thiserror::Error; diff --git a/src/uu/wc/src/wordcount.rs b/src/uu/wc/src/word_count.rs similarity index 98% rename from src/uu/wc/src/wordcount.rs rename to src/uu/wc/src/word_count.rs index 9e2a81fca..bdb510f58 100644 --- a/src/uu/wc/src/wordcount.rs +++ b/src/uu/wc/src/word_count.rs @@ -123,7 +123,7 @@ impl WordCount { /// This struct supplements the actual word count with an optional title that is /// displayed to the user at the end of the program. /// The reason we don't simply include title in the `WordCount` struct is that -/// it would result in unneccesary copying of `String`. +/// it would result in unnecessary copying of `String`. #[derive(Debug, Default, Clone)] pub struct TitledWordCount<'a> { pub title: Option<&'a str>, diff --git a/src/uu/who/src/main.rs b/src/uu/who/src/main.rs index bc0015a80..a093201a1 100644 --- a/src/uu/who/src/main.rs +++ b/src/uu/who/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_who); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_who); diff --git a/src/uu/whoami/src/main.rs b/src/uu/whoami/src/main.rs index 0439923ee..40de26564 100644 --- a/src/uu/whoami/src/main.rs +++ b/src/uu/whoami/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_whoami); // spell-checker:ignore procs uucore whoami +uucore_procs::main!(uu_whoami); diff --git a/src/uu/whoami/src/platform/mod.rs b/src/uu/whoami/src/platform/mod.rs index ab0b856e6..b5064a8d2 100644 --- a/src/uu/whoami/src/platform/mod.rs +++ b/src/uu/whoami/src/platform/mod.rs @@ -10,10 +10,10 @@ // spell-checker:ignore (ToDO) getusername #[cfg(unix)] -pub use self::unix::getusername; +pub use self::unix::get_username; #[cfg(windows)] -pub use self::windows::getusername; +pub use self::windows::get_username; #[cfg(unix)] mod unix; diff --git a/src/uu/whoami/src/platform/unix.rs b/src/uu/whoami/src/platform/unix.rs index 33bfa6025..3d5fc6f54 100644 --- a/src/uu/whoami/src/platform/unix.rs +++ b/src/uu/whoami/src/platform/unix.rs @@ -14,7 +14,7 @@ use std::io::Result; use uucore::entries::uid2usr; use uucore::libc::geteuid; -pub unsafe fn getusername() -> Result { +pub unsafe fn get_username() -> Result { // Get effective user id let uid = geteuid(); uid2usr(uid) diff --git a/src/uu/whoami/src/platform/windows.rs b/src/uu/whoami/src/platform/windows.rs index 1d65281bd..5d648877b 100644 --- a/src/uu/whoami/src/platform/windows.rs +++ b/src/uu/whoami/src/platform/windows.rs @@ -7,8 +7,6 @@ * file that was distributed with this source code. */ -// spell-checker:ignore (ToDO) advapi lmcons winnt getusername WCHAR UNLEN - extern crate winapi; use self::winapi::shared::lmcons; @@ -18,7 +16,7 @@ use std::io::{Error, Result}; use std::mem; use uucore::wide::FromWide; -pub unsafe fn getusername() -> Result { +pub unsafe fn get_username() -> Result { #[allow(deprecated)] let mut buffer: [winnt::WCHAR; lmcons::UNLEN as usize + 1] = mem::uninitialized(); let mut len = buffer.len() as minwindef::DWORD; diff --git a/src/uu/whoami/src/whoami.rs b/src/uu/whoami/src/whoami.rs index 21e170dec..383fb40b5 100644 --- a/src/uu/whoami/src/whoami.rs +++ b/src/uu/whoami/src/whoami.rs @@ -7,8 +7,6 @@ /* last synced with: whoami (GNU coreutils) 8.21 */ -// spell-checker:ignore (ToDO) getusername - #[macro_use] extern crate clap; #[macro_use] @@ -38,7 +36,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 { pub fn exec() { unsafe { - match platform::getusername() { + match platform::get_username() { Ok(username) => println!("{}", username), Err(err) => match err.raw_os_error() { Some(0) | None => crash!(1, "failed to get username"), diff --git a/src/uu/yes/src/main.rs b/src/uu/yes/src/main.rs index 597eb5b57..dc5bf6a0c 100644 --- a/src/uu/yes/src/main.rs +++ b/src/uu/yes/src/main.rs @@ -1 +1 @@ -uucore_procs::main!(uu_yes); // spell-checker:ignore procs uucore +uucore_procs::main!(uu_yes); diff --git a/src/uucore/src/lib/features/fs.rs b/src/uucore/src/lib/features/fs.rs index afaa07af1..38cdbef94 100644 --- a/src/uucore/src/lib/features/fs.rs +++ b/src/uucore/src/lib/features/fs.rs @@ -390,8 +390,8 @@ mod tests { test: "C:/you/later", }, NormalizePathTestCase { - path: "\\networkshare/a//foo//./bar", - test: "\\networkshare/a/foo/bar", + path: "\\networkShare/a//foo//./bar", + test: "\\networkShare/a/foo/bar", }, ]; @@ -411,6 +411,7 @@ mod tests { #[cfg(unix)] #[test] fn test_display_permissions() { + // spell-checker:ignore (perms) brwsr drwxr rwxr assert_eq!( "drwxr-xr-x", display_permissions_unix(S_IFDIR | 0o755, true) diff --git a/src/uucore/src/lib/features/fsext.rs b/src/uucore/src/lib/features/fsext.rs index 6343ecd50..d3eec468a 100644 --- a/src/uucore/src/lib/features/fsext.rs +++ b/src/uucore/src/lib/features/fsext.rs @@ -7,7 +7,7 @@ // For the full copyright and license information, please view the LICENSE file // that was distributed with this source code. -// spell-checker:ignore (ToDO) strerror IFBLK IFCHR IFDIR IFLNK IFIFO IFMT IFREG IFSOCK subsec nanos gnulib statfs Sstatfs bitrig statvfs iosize blksize fnodes fsid namelen bsize bfree bavail ffree frsize namemax errno fstype adfs acfs aufs affs autofs befs bdevfs binfmt ceph cgroups cifs configfs cramfs cgroupfs debugfs devfs devpts ecryptfs btrfs efivarfs exofs fhgfs fuseblk fusectl futexfs gpfs hfsx hostfs hpfs inodefs ibrix inotifyfs isofs jffs logfs hugetlbfs mqueue nsfs ntfs ocfs panfs pipefs ramfs romfs nfsd nilfs pstorefs reiserfs securityfs smackfs snfs sockfs squashfs sysfs sysv tempfs tracefs ubifs usbdevfs vmhgfs tmpfs vxfs wslfs xenfs vzfs openprom overlayfs +// spell-checker:ignore (arch) bitrig ; (fs) cifs smbfs extern crate time; @@ -88,7 +88,7 @@ use std::time::UNIX_EPOCH; target_os = "android", target_os = "freebsd" ))] -pub use libc::statfs as Sstatfs; +pub use libc::statfs as StatFs; #[cfg(any( target_os = "openbsd", target_os = "netbsd", @@ -96,7 +96,7 @@ pub use libc::statfs as Sstatfs; target_os = "bitrig", target_os = "dragonfly" ))] -pub use libc::statvfs as Sstatfs; +pub use libc::statvfs as StatFs; #[cfg(any( target_os = "linux", @@ -168,6 +168,7 @@ impl MountInfo { } } // set MountInfo::dummy + // spell-checker:disable match self.fs_type.as_ref() { "autofs" | "proc" | "subfs" /* for Linux 2.6/3.x */ @@ -181,6 +182,7 @@ impl MountInfo { _ => self.dummy = self.fs_type == "none" && !self.mount_option.contains(MOUNT_OPT_BIND) } + // spell-checker:enable // set MountInfo::remote #[cfg(windows)] { @@ -203,6 +205,7 @@ impl MountInfo { #[cfg(target_os = "linux")] fn new(file_name: &str, raw: Vec<&str>) -> Option { match file_name { + // spell-checker:ignore (word) noatime // Format: 36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue // "man proc" for more details LINUX_MOUNTINFO => { @@ -307,21 +310,24 @@ impl MountInfo { #[cfg(any(target_vendor = "apple", target_os = "freebsd"))] use std::ffi::CStr; #[cfg(any(target_os = "freebsd", target_vendor = "apple"))] -impl From for MountInfo { - fn from(statfs: Sstatfs) -> Self { +impl From for MountInfo { + fn from(statfs: StatFs) -> Self { let mut info = MountInfo { dev_id: "".to_string(), dev_name: unsafe { + // spell-checker:disable-next-line CStr::from_ptr(&statfs.f_mntfromname[0]) .to_string_lossy() .into_owned() }, fs_type: unsafe { + // spell-checker:disable-next-line CStr::from_ptr(&statfs.f_fstypename[0]) .to_string_lossy() .into_owned() }, mount_dir: unsafe { + // spell-checker:disable-next-line CStr::from_ptr(&statfs.f_mntonname[0]) .to_string_lossy() .into_owned() @@ -341,14 +347,15 @@ use libc::c_int; #[cfg(any(target_os = "freebsd", target_vendor = "apple"))] extern "C" { #[cfg(all(target_vendor = "apple", target_arch = "x86_64"))] - #[link_name = "getmntinfo$INODE64"] - fn getmntinfo(mntbufp: *mut *mut Sstatfs, flags: c_int) -> c_int; + #[link_name = "getmntinfo$INODE64"] // spell-checker:disable-line + fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int; #[cfg(any( all(target_os = "freebsd"), all(target_vendor = "apple", target_arch = "aarch64") ))] - fn getmntinfo(mntbufp: *mut *mut Sstatfs, flags: c_int) -> c_int; + #[link_name = "getmntinfo"] // spell-checker:disable-line + fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int; } #[cfg(target_os = "linux")] @@ -363,11 +370,11 @@ use std::slice; pub fn read_fs_list() -> Vec { #[cfg(target_os = "linux")] { - let (file_name, fobj) = File::open(LINUX_MOUNTINFO) + let (file_name, f) = File::open(LINUX_MOUNTINFO) .map(|f| (LINUX_MOUNTINFO, f)) .or_else(|_| File::open(LINUX_MTAB).map(|f| (LINUX_MTAB, f))) .expect("failed to find mount list files"); - let reader = BufReader::new(fobj); + let reader = BufReader::new(f); reader .lines() .filter_map(|line| line.ok()) @@ -379,12 +386,12 @@ pub fn read_fs_list() -> Vec { } #[cfg(any(target_os = "freebsd", target_vendor = "apple"))] { - let mut mptr: *mut Sstatfs = ptr::null_mut(); - let len = unsafe { getmntinfo(&mut mptr, 1_i32) }; + let mut mount_buffer_ptr: *mut StatFs = ptr::null_mut(); + let len = unsafe { get_mount_info(&mut mount_buffer_ptr, 1_i32) }; if len < 0 { - crash!(1, "getmntinfo failed"); + crash!(1, "get_mount_info() failed"); } - let mounts = unsafe { slice::from_raw_parts(mptr, len as usize) }; + let mounts = unsafe { slice::from_raw_parts(mount_buffer_ptr, len as usize) }; mounts .iter() .map(|m| MountInfo::from(*m)) @@ -446,7 +453,7 @@ pub struct FsUsage { impl FsUsage { #[cfg(unix)] - pub fn new(statvfs: Sstatfs) -> FsUsage { + pub fn new(statvfs: StatFs) -> FsUsage { { FsUsage { blocksize: statvfs.f_bsize as u64, // or `statvfs.f_frsize` ? @@ -523,20 +530,20 @@ impl FsUsage { #[cfg(unix)] pub trait FsMeta { fn fs_type(&self) -> i64; - fn iosize(&self) -> u64; - fn blksize(&self) -> i64; + fn io_size(&self) -> u64; + fn block_size(&self) -> i64; fn total_blocks(&self) -> u64; fn free_blocks(&self) -> u64; fn avail_blocks(&self) -> u64; - fn total_fnodes(&self) -> u64; - fn free_fnodes(&self) -> u64; + fn total_file_nodes(&self) -> u64; + fn free_file_nodes(&self) -> u64; fn fsid(&self) -> u64; fn namelen(&self) -> u64; } #[cfg(unix)] -impl FsMeta for Sstatfs { - fn blksize(&self) -> i64 { +impl FsMeta for StatFs { + fn block_size(&self) -> i64 { self.f_bsize as i64 } fn total_blocks(&self) -> u64 { @@ -548,10 +555,10 @@ impl FsMeta for Sstatfs { fn avail_blocks(&self) -> u64 { self.f_bavail as u64 } - fn total_fnodes(&self) -> u64 { + fn total_file_nodes(&self) -> u64 { self.f_files as u64 } - fn free_fnodes(&self) -> u64 { + fn free_file_nodes(&self) -> u64 { self.f_ffree as u64 } #[cfg(any(target_os = "linux", target_vendor = "apple", target_os = "freebsd"))] @@ -565,16 +572,16 @@ impl FsMeta for Sstatfs { } #[cfg(target_os = "linux")] - fn iosize(&self) -> u64 { + fn io_size(&self) -> u64 { self.f_frsize as u64 } #[cfg(any(target_vendor = "apple", target_os = "freebsd"))] - fn iosize(&self) -> u64 { + fn io_size(&self) -> u64 { self.f_iosize as u64 } // XXX: dunno if this is right #[cfg(not(any(target_vendor = "apple", target_os = "freebsd", target_os = "linux")))] - fn iosize(&self) -> u64 { + fn io_size(&self) -> u64 { self.f_bsize as u64 } @@ -605,23 +612,23 @@ impl FsMeta for Sstatfs { } #[cfg(target_os = "freebsd")] fn namelen(&self) -> u64 { - self.f_namemax as u64 + self.f_namemax as u64 // spell-checker:disable-line } // XXX: should everything just use statvfs? #[cfg(not(any(target_vendor = "apple", target_os = "freebsd", target_os = "linux")))] fn namelen(&self) -> u64 { - self.f_namemax as u64 + self.f_namemax as u64 // spell-checker:disable-line } } #[cfg(unix)] -pub fn statfs>(path: P) -> Result +pub fn statfs>(path: P) -> Result where Vec: From

, { match CString::new(path) { Ok(p) => { - let mut buffer: Sstatfs = unsafe { mem::zeroed() }; + let mut buffer: StatFs = unsafe { mem::zeroed() }; unsafe { match statfs_fn(p.as_ptr(), &mut buffer) { 0 => Ok(buffer), @@ -667,12 +674,13 @@ pub fn pretty_filetype<'a>(mode: mode_t, size: u64) -> &'a str { S_IFIFO => "fifo", S_IFSOCK => "socket", // TODO: Other file types - // See coreutils/gnulib/lib/file-type.c + // See coreutils/gnulib/lib/file-type.c // spell-checker:disable-line _ => "weird file", } } pub fn pretty_fstype<'a>(fstype: i64) -> Cow<'a, str> { + // spell-checker:disable match fstype { 0x6163_6673 => "acfs".into(), 0xADF5 => "adfs".into(), @@ -790,6 +798,7 @@ pub fn pretty_fstype<'a>(fstype: i64) -> Cow<'a, str> { 0x2FC1_2FC1 => "zfs".into(), other => format!("UNKNOWN ({:#x})", other).into(), } + // spell-checker:enable } #[cfg(test)] @@ -808,6 +817,7 @@ mod tests { #[test] fn test_fs_type() { + // spell-checker:disable assert_eq!("ext2/ext3", pretty_fstype(0xEF53)); assert_eq!("tmpfs", pretty_fstype(0x01021994)); assert_eq!("nfs", pretty_fstype(0x6969)); @@ -817,5 +827,6 @@ mod tests { assert_eq!("ntfs", pretty_fstype(0x5346544e)); assert_eq!("fat", pretty_fstype(0x4006)); assert_eq!("UNKNOWN (0x1234)", pretty_fstype(0x1234)); + // spell-checker:enable } } diff --git a/src/uucore/src/lib/features/perms.rs b/src/uucore/src/lib/features/perms.rs index 36f56206d..eb6cca102 100644 --- a/src/uucore/src/lib/features/perms.rs +++ b/src/uucore/src/lib/features/perms.rs @@ -26,14 +26,14 @@ pub enum Verbosity { } /// Actually perform the change of group on a path -fn chgrp>(path: P, dgid: gid_t, follow: bool) -> IOResult<()> { +fn chgrp>(path: P, gid: gid_t, follow: bool) -> IOResult<()> { let path = path.as_ref(); let s = CString::new(path.as_os_str().as_bytes()).unwrap(); let ret = unsafe { if follow { - libc::chown(s.as_ptr(), 0_u32.wrapping_sub(1), dgid) + libc::chown(s.as_ptr(), 0_u32.wrapping_sub(1), gid) } else { - lchown(s.as_ptr(), 0_u32.wrapping_sub(1), dgid) + lchown(s.as_ptr(), 0_u32.wrapping_sub(1), gid) } }; if ret == 0 { @@ -100,14 +100,14 @@ pub fn wrap_chgrp>( } /// Actually perform the change of owner on a path -fn chown>(path: P, duid: uid_t, dgid: gid_t, follow: bool) -> IOResult<()> { +fn chown>(path: P, uid: uid_t, gid: gid_t, follow: bool) -> IOResult<()> { let path = path.as_ref(); let s = CString::new(path.as_os_str().as_bytes()).unwrap(); let ret = unsafe { if follow { - libc::chown(s.as_ptr(), duid, dgid) + libc::chown(s.as_ptr(), uid, gid) } else { - lchown(s.as_ptr(), duid, dgid) + lchown(s.as_ptr(), uid, gid) } }; if ret == 0 { diff --git a/src/uucore/src/lib/features/ringbuffer.rs b/src/uucore/src/lib/features/ringbuffer.rs index 60847df8f..1cb0d2b0d 100644 --- a/src/uucore/src/lib/features/ringbuffer.rs +++ b/src/uucore/src/lib/features/ringbuffer.rs @@ -47,11 +47,11 @@ impl RingBuffer { } pub fn from_iter(iter: impl Iterator, size: usize) -> RingBuffer { - let mut ringbuf = RingBuffer::new(size); + let mut ring_buffer = RingBuffer::new(size); for value in iter { - ringbuf.push_back(value); + ring_buffer.push_back(value); } - ringbuf + ring_buffer } /// Append a value to the end of the ring buffer. diff --git a/src/uucore/src/lib/features/utmpx.rs b/src/uucore/src/lib/features/utmpx.rs index 826831ba6..a794b01da 100644 --- a/src/uucore/src/lib/features/utmpx.rs +++ b/src/uucore/src/lib/features/utmpx.rs @@ -238,8 +238,8 @@ impl UtmpxIter { /// If not set, default record file will be used(file path depends on the target OS) pub fn read_from(self, f: &str) -> Self { let res = unsafe { - let cstr = CString::new(f).unwrap(); - utmpxname(cstr.as_ptr()) + let cstring = CString::new(f).unwrap(); + utmpxname(cstring.as_ptr()) }; if res != 0 { show_warning!("utmpxname: {}", IOError::last_os_error()); diff --git a/src/uucore/src/lib/lib.rs b/src/uucore/src/lib/lib.rs index c154f23c2..84adeeb34 100644 --- a/src/uucore/src/lib/lib.rs +++ b/src/uucore/src/lib/lib.rs @@ -132,7 +132,7 @@ pub trait Args: Iterator + Sized { full_conversion = false; let lossy_conversion = s_ret.to_string_lossy(); eprintln!( - "Input with broken encoding occured! (s = '{}') ", + "Input with broken encoding occurred! (s = '{}') ", &lossy_conversion ); match handling { @@ -161,7 +161,7 @@ pub trait Args: Iterator + Sized { } } - /// convience function for a more slim interface + /// convenience function for a more slim interface fn collect_str_lossy(self) -> ConversionResult { self.collect_str(InvalidEncodingHandling::ConvertLossy) } diff --git a/src/uucore/src/lib/macros.rs b/src/uucore/src/lib/macros.rs index 438fec960..07d47eed8 100644 --- a/src/uucore/src/lib/macros.rs +++ b/src/uucore/src/lib/macros.rs @@ -21,7 +21,7 @@ macro_rules! executable( }) ); -/// Show an error to stderr in a silimar style to GNU coreutils. +/// Show an error to stderr in a similar style to GNU coreutils. #[macro_export] macro_rules! show_error( ($($args:tt)+) => ({ @@ -30,7 +30,7 @@ macro_rules! show_error( }) ); -/// Show a warning to stderr in a silimar style to GNU coreutils. +/// Show a warning to stderr in a similar style to GNU coreutils. #[macro_export] macro_rules! show_error_custom_description ( ($err:expr,$($args:tt)+) => ({ @@ -47,7 +47,7 @@ macro_rules! show_warning( }) ); -/// Show a bad inocation help message in a similar style to GNU coreutils. +/// Show a bad invocation help message in a similar style to GNU coreutils. #[macro_export] macro_rules! show_usage_error( ($($args:tt)+) => ({ diff --git a/src/uucore/src/lib/mods/os.rs b/src/uucore/src/lib/mods/os.rs index da2002161..dd06f4739 100644 --- a/src/uucore/src/lib/mods/os.rs +++ b/src/uucore/src/lib/mods/os.rs @@ -1,5 +1,8 @@ /// Test if the program is running under WSL // ref: @@ + +// spell-checker:ignore (path) osrelease + pub fn is_wsl_1() -> bool { #[cfg(target_os = "linux")] { diff --git a/tests/benches/factor/benches/gcd.rs b/tests/benches/factor/benches/gcd.rs index 803c37d3c..f2bae51c7 100644 --- a/tests/benches/factor/benches/gcd.rs +++ b/tests/benches/factor/benches/gcd.rs @@ -3,7 +3,7 @@ use uu_factor::numeric; fn gcd(c: &mut Criterion) { let inputs = { - // Deterministic RNG; use an explicitely-named RNG to guarantee stability + // Deterministic RNG; use an explicitly-named RNG to guarantee stability use rand::{RngCore, SeedableRng}; use rand_chacha::ChaCha8Rng; const SEED: u64 = 0xa_b4d_1dea_dead_cafe; diff --git a/tests/benches/factor/benches/table.rs b/tests/benches/factor/benches/table.rs index 0b31b2b4c..9090c7d51 100644 --- a/tests/benches/factor/benches/table.rs +++ b/tests/benches/factor/benches/table.rs @@ -15,10 +15,10 @@ fn table(c: &mut Criterion) { CHUNK_SIZE ); let inputs = { - // Deterministic RNG; use an explicitely-named RNG to guarantee stability + // Deterministic RNG; use an explicitly-named RNG to guarantee stability use rand::{RngCore, SeedableRng}; use rand_chacha::ChaCha8Rng; - const SEED: u64 = 0xdead_bebe_ea75_cafe; + const SEED: u64 = 0xdead_bebe_ea75_cafe; // spell-checker:disable-line let mut rng = ChaCha8Rng::seed_from_u64(SEED); std::iter::repeat_with(move || array_init::<_, _, INPUT_SIZE>(|_| rng.next_u64())) diff --git a/tests/by-util/test_base32.rs b/tests/by-util/test_base32.rs index 788b85efa..8e3e780c5 100644 --- a/tests/by-util/test_base32.rs +++ b/tests/by-util/test_base32.rs @@ -14,14 +14,14 @@ fn test_encode() { new_ucmd!() .pipe_in(input) .succeeds() - .stdout_only("JBSWY3DPFQQFO33SNRSCC===\n"); + .stdout_only("JBSWY3DPFQQFO33SNRSCC===\n"); // spell-checker:disable-line // Using '-' as our file new_ucmd!() .arg("-") .pipe_in(input) .succeeds() - .stdout_only("JBSWY3DPFQQFO33SNRSCC===\n"); + .stdout_only("JBSWY3DPFQQFO33SNRSCC===\n"); // spell-checker:disable-line } #[test] @@ -29,13 +29,13 @@ fn test_base32_encode_file() { new_ucmd!() .arg("input-simple.txt") .succeeds() - .stdout_only("JBSWY3DPFQQFO33SNRSCCCQ=\n"); + .stdout_only("JBSWY3DPFQQFO33SNRSCCCQ=\n"); // spell-checker:disable-line } #[test] fn test_decode() { for decode_param in &["-d", "--decode"] { - let input = "JBSWY3DPFQQFO33SNRSCC===\n"; + let input = "JBSWY3DPFQQFO33SNRSCC===\n"; // spell-checker:disable-line new_ucmd!() .arg(decode_param) .pipe_in(input) @@ -46,7 +46,7 @@ fn test_decode() { #[test] fn test_garbage() { - let input = "aGVsbG8sIHdvcmxkIQ==\0"; + let input = "aGVsbG8sIHdvcmxkIQ==\0"; // spell-checker:disable-line new_ucmd!() .arg("-d") .pipe_in(input) @@ -57,7 +57,7 @@ fn test_garbage() { #[test] fn test_ignore_garbage() { for ignore_garbage_param in &["-i", "--ignore-garbage"] { - let input = "JBSWY\x013DPFQ\x02QFO33SNRSCC===\n"; + let input = "JBSWY\x013DPFQ\x02QFO33SNRSCC===\n"; // spell-checker:disable-line new_ucmd!() .arg("-d") .arg(ignore_garbage_param) @@ -77,7 +77,7 @@ fn test_wrap() { .pipe_in(input) .succeeds() .stdout_only( - "KRUGKIDROVUWG2ZAMJZG\n653OEBTG66BANJ2W24DT\nEBXXMZLSEB2GQZJANRQX\nU6JAMRXWOLQ=\n", + "KRUGKIDROVUWG2ZAMJZG\n653OEBTG66BANJ2W24DT\nEBXXMZLSEB2GQZJANRQX\nU6JAMRXWOLQ=\n", // spell-checker:disable-line ); } } diff --git a/tests/by-util/test_base64.rs b/tests/by-util/test_base64.rs index 75445c933..236f53fb1 100644 --- a/tests/by-util/test_base64.rs +++ b/tests/by-util/test_base64.rs @@ -6,14 +6,14 @@ fn test_encode() { new_ucmd!() .pipe_in(input) .succeeds() - .stdout_only("aGVsbG8sIHdvcmxkIQ==\n"); + .stdout_only("aGVsbG8sIHdvcmxkIQ==\n"); // spell-checker:disable-line // Using '-' as our file new_ucmd!() .arg("-") .pipe_in(input) .succeeds() - .stdout_only("aGVsbG8sIHdvcmxkIQ==\n"); + .stdout_only("aGVsbG8sIHdvcmxkIQ==\n"); // spell-checker:disable-line } #[test] @@ -21,13 +21,13 @@ fn test_base64_encode_file() { new_ucmd!() .arg("input-simple.txt") .succeeds() - .stdout_only("SGVsbG8sIFdvcmxkIQo=\n"); + .stdout_only("SGVsbG8sIFdvcmxkIQo=\n"); // spell-checker:disable-line } #[test] fn test_decode() { for decode_param in &["-d", "--decode"] { - let input = "aGVsbG8sIHdvcmxkIQ=="; + let input = "aGVsbG8sIHdvcmxkIQ=="; // spell-checker:disable-line new_ucmd!() .arg(decode_param) .pipe_in(input) @@ -38,7 +38,7 @@ fn test_decode() { #[test] fn test_garbage() { - let input = "aGVsbG8sIHdvcmxkIQ==\0"; + let input = "aGVsbG8sIHdvcmxkIQ==\0"; // spell-checker:disable-line new_ucmd!() .arg("-d") .pipe_in(input) @@ -49,7 +49,7 @@ fn test_garbage() { #[test] fn test_ignore_garbage() { for ignore_garbage_param in &["-i", "--ignore-garbage"] { - let input = "aGVsbG8sIHdvcmxkIQ==\0"; + let input = "aGVsbG8sIHdvcmxkIQ==\0"; // spell-checker:disable-line new_ucmd!() .arg("-d") .arg(ignore_garbage_param) @@ -68,6 +68,7 @@ fn test_wrap() { .arg("20") .pipe_in(input) .succeeds() + // spell-checker:disable-next-line .stdout_only("VGhlIHF1aWNrIGJyb3du\nIGZveCBqdW1wcyBvdmVy\nIHRoZSBsYXp5IGRvZy4=\n"); } } diff --git a/tests/by-util/test_basename.rs b/tests/by-util/test_basename.rs index 50d22b2eb..d9632106e 100644 --- a/tests/by-util/test_basename.rs +++ b/tests/by-util/test_basename.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) reallylongexecutable + use crate::common::util::*; #[cfg(any(unix, target_os = "redox"))] use std::ffi::OsStr; @@ -50,7 +52,7 @@ fn test_remove_suffix() { } #[test] -fn test_dont_remove_suffix() { +fn test_do_not_remove_suffix() { new_ucmd!() .args(&["/foo/bar/baz", "baz"]) .succeeds() @@ -64,7 +66,7 @@ fn test_multiple_param() { new_ucmd!() .args(&[multiple_param, path, path]) .succeeds() - .stdout_only("baz\nbaz\n"); + .stdout_only("baz\nbaz\n"); // spell-checker:disable-line } } @@ -75,7 +77,7 @@ fn test_suffix_param() { new_ucmd!() .args(&[suffix_param, ".exe", path, path]) .succeeds() - .stdout_only("baz\nbaz\n"); + .stdout_only("baz\nbaz\n"); // spell-checker:disable-line } } diff --git a/tests/by-util/test_cat.rs b/tests/by-util/test_cat.rs index 8ea5bbaae..fadf378ab 100644 --- a/tests/by-util/test_cat.rs +++ b/tests/by-util/test_cat.rs @@ -9,11 +9,12 @@ fn test_output_simple() { new_ucmd!() .args(&["alpha.txt"]) .succeeds() - .stdout_only("abcde\nfghij\nklmno\npqrst\nuvwxyz\n"); + .stdout_only("abcde\nfghij\nklmno\npqrst\nuvwxyz\n"); // spell-checker:disable-line } #[test] fn test_no_options() { + // spell-checker:disable-next-line for fixture in &["empty.txt", "alpha.txt", "nonewline.txt"] { // Give fixture through command line file argument new_ucmd!() @@ -66,8 +67,8 @@ fn test_fifo_symlink() { assert!(s.fixtures.is_fifo("dir/pipe")); // Make cat read the pipe through a symlink - s.fixtures.symlink_file("dir/pipe", "sympipe"); - let proc = s.ucmd().args(&["sympipe"]).run_no_wait(); + s.fixtures.symlink_file("dir/pipe", "sympipe"); // spell-checker:disable-line + let proc = s.ucmd().args(&["sympipe"]).run_no_wait(); // spell-checker:disable-line let data = vec_of_size(128 * 1024); let data2 = data.clone(); @@ -110,7 +111,7 @@ fn test_piped_to_regular_file() { .succeeds(); } let contents = read_to_string(&file_path).unwrap(); - assert_eq!(contents, "abcde\nfghij\nklmno\npqrst\nuvwxyz\n"); + assert_eq!(contents, "abcde\nfghij\nklmno\npqrst\nuvwxyz\n"); // spell-checker:disable-line } } @@ -169,6 +170,7 @@ fn test_directory() { fn test_directory_and_file() { let s = TestScenario::new(util_name!()); s.fixtures.mkdir("test_directory2"); + // spell-checker:disable-next-line for fixture in &["empty.txt", "alpha.txt", "nonewline.txt"] { s.ucmd() .args(&["test_directory2", fixture]) @@ -190,8 +192,8 @@ fn test_three_directories_and_file_and_stdin() { "test_directory3/test_directory4", "alpha.txt", "-", - "filewhichdoesnotexist.txt", - "nonewline.txt", + "file_which_does_not_exist.txt", + "nonewline.txt", // spell-checker:disable-line "test_directory3/test_directory5", "test_directory3/../test_directory3/test_directory5", "test_directory3", @@ -200,12 +202,13 @@ fn test_three_directories_and_file_and_stdin() { .fails() .stderr_is_fixture("three_directories_and_file_and_stdin.stderr.expected") .stdout_is( - "abcde\nfghij\nklmno\npqrst\nuvwxyz\nstdout bytestext without a trailing newline", + "abcde\nfghij\nklmno\npqrst\nuvwxyz\nstdout bytestext without a trailing newline", // spell-checker:disable-line ); } #[test] fn test_output_multi_files_print_all_chars() { + // spell-checker:disable new_ucmd!() .args(&["alpha.txt", "256.txt", "-A", "-n"]) .succeeds() @@ -222,10 +225,12 @@ fn test_output_multi_files_print_all_chars() { M-VM-WM-XM-YM-ZM-[M-\\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-oM-\ pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^?", ); + // spell-checker:enable } #[test] fn test_numbered_lines_no_trailing_newline() { + // spell-checker:disable new_ucmd!() .args(&["nonewline.txt", "alpha.txt", "-n"]) .succeeds() @@ -233,6 +238,7 @@ fn test_numbered_lines_no_trailing_newline() { " 1\ttext without a trailing newlineabcde\n 2\tfghij\n \ 3\tklmno\n 4\tpqrst\n 5\tuvwxyz\n", ); + // spell-checker:enable } #[test] @@ -310,6 +316,7 @@ fn test_stdin_squeeze_blank() { #[test] fn test_stdin_number_non_blank() { + // spell-checker:disable-next-line for same_param in &["-b", "--number-nonblank"] { new_ucmd!() .arg(same_param) @@ -322,6 +329,7 @@ fn test_stdin_number_non_blank() { #[test] fn test_non_blank_overrides_number() { + // spell-checker:disable-next-line for &same_param in &["-b", "--number-nonblank"] { new_ucmd!() .args(&[same_param, "-"]) diff --git a/tests/by-util/test_chgrp.rs b/tests/by-util/test_chgrp.rs index c0fc503ae..45380b80b 100644 --- a/tests/by-util/test_chgrp.rs +++ b/tests/by-util/test_chgrp.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) nosuchgroup + use crate::common::util::*; use rust_users::*; diff --git a/tests/by-util/test_chmod.rs b/tests/by-util/test_chmod.rs index 4611d1b96..186c645e5 100644 --- a/tests/by-util/test_chmod.rs +++ b/tests/by-util/test_chmod.rs @@ -21,7 +21,7 @@ struct TestCase { after: u32, } -fn mkfile(file: &str, mode: u32) { +fn make_file(file: &str, mode: u32) { OpenOptions::new() .mode(mode) .create(true) @@ -34,7 +34,7 @@ fn mkfile(file: &str, mode: u32) { } fn run_single_test(test: &TestCase, at: AtPath, mut ucmd: UCommand) { - mkfile(&at.plus_as_string(TEST_FILE), test.before); + make_file(&at.plus_as_string(TEST_FILE), test.before); let perms = at.metadata(TEST_FILE).permissions().mode(); if perms != test.before { panic!( @@ -123,6 +123,7 @@ fn test_chmod_octal() { #[test] #[allow(clippy::unreadable_literal)] +// spell-checker:disable-next-line fn test_chmod_ugoa() { let _guard = UMASK_MUTEX.lock(); @@ -283,7 +284,7 @@ fn test_chmod_reference_file() { }, ]; let (at, ucmd) = at_and_ucmd!(); - mkfile(&at.plus_as_string(REFERENCE_FILE), REFERENCE_PERMS); + make_file(&at.plus_as_string(REFERENCE_FILE), REFERENCE_PERMS); run_single_test(&tests[0], at, ucmd); } @@ -318,10 +319,10 @@ fn test_chmod_recursive() { at.mkdir("a/b"); at.mkdir("a/b/c"); at.mkdir("z"); - mkfile(&at.plus_as_string("a/a"), 0o100444); - mkfile(&at.plus_as_string("a/b/b"), 0o100444); - mkfile(&at.plus_as_string("a/b/c/c"), 0o100444); - mkfile(&at.plus_as_string("z/y"), 0o100444); + make_file(&at.plus_as_string("a/a"), 0o100444); + make_file(&at.plus_as_string("a/b/b"), 0o100444); + make_file(&at.plus_as_string("a/b/c/c"), 0o100444); + make_file(&at.plus_as_string("z/y"), 0o100444); ucmd.arg("-R") .arg("--verbose") @@ -351,9 +352,9 @@ fn test_chmod_non_existing_file() { .arg("-R") .arg("--verbose") .arg("-r,a+w") - .arg("dont-exist") + .arg("does-not-exist") .fails() - .stderr_contains(&"cannot access 'dont-exist': No such file or directory"); + .stderr_contains(&"cannot access 'does-not-exist': No such file or directory"); } #[test] @@ -432,6 +433,7 @@ fn test_chmod_symlink_non_existing_file_recursive() { .no_stdout(); let expected_stdout = &format!( + // spell-checker:disable-next-line "mode of '{}' retained as 0755 (rwxr-xr-x)\nneither symbolic link '{}/{}' nor referent has been changed", test_directory, test_directory, test_symlink ); @@ -473,8 +475,8 @@ fn test_chmod_strip_minus_from_mode() { ("chmod -c -R +w FILE ", "chmod -c -R +w FILE "), ("chmod a=r,=xX FILE", "chmod a=r,=xX FILE"), ( - "chmod -v --reference RFILE -R FILE", - "chmod -v --reference RFILE -R FILE", + "chmod -v --reference REF_FILE -R FILE", + "chmod -v --reference REF_FILE -R FILE", ), ("chmod -Rvc -w-x FILE", "chmod -Rvc w-x FILE"), ("chmod 755 -v FILE", "chmod 755 -v FILE"), diff --git a/tests/by-util/test_chown.rs b/tests/by-util/test_chown.rs index a531fc7f3..c8a8ea538 100644 --- a/tests/by-util/test_chown.rs +++ b/tests/by-util/test_chown.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) agroupthatdoesntexist auserthatdoesntexist groupname notexisting passgrp + use crate::common::util::*; #[cfg(target_os = "linux")] use rust_users::get_effective_uid; diff --git a/tests/by-util/test_chroot.rs b/tests/by-util/test_chroot.rs index 0479e7c3a..3bac07d44 100644 --- a/tests/by-util/test_chroot.rs +++ b/tests/by-util/test_chroot.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) araba newroot userspec + use crate::common::util::*; #[test] diff --git a/tests/by-util/test_cksum.rs b/tests/by-util/test_cksum.rs index 0fd028781..9590c1ac5 100644 --- a/tests/by-util/test_cksum.rs +++ b/tests/by-util/test_cksum.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) asdf + use crate::common::util::*; #[test] @@ -40,7 +42,7 @@ fn test_empty() { #[test] fn test_arg_overrides_stdin() { let (at, mut ucmd) = at_and_ucmd!(); - let input = "foobarfoobar"; + let input = "foobarfoobar"; // spell-checker:disable-line at.touch("a"); @@ -78,17 +80,17 @@ fn test_invalid_file() { } // Make sure crc is correct for files larger than 32 bytes -// but <128 bytes (1 fold pclmul) +// but <128 bytes (1 fold pclmul) // spell-checker:disable-line #[test] fn test_crc_for_bigger_than_32_bytes() { let (_, mut ucmd) = at_and_ucmd!(); let result = ucmd.arg("chars.txt").succeeds(); - let mut stdout_splitted = result.stdout_str().split(' '); + let mut stdout_split = result.stdout_str().split(' '); - let cksum: i64 = stdout_splitted.next().unwrap().parse().unwrap(); - let bytes_cnt: i64 = stdout_splitted.next().unwrap().parse().unwrap(); + let cksum: i64 = stdout_split.next().unwrap().parse().unwrap(); + let bytes_cnt: i64 = stdout_split.next().unwrap().parse().unwrap(); assert_eq!(cksum, 586_047_089); assert_eq!(bytes_cnt, 16); @@ -100,10 +102,10 @@ fn test_stdin_larger_than_128_bytes() { let result = ucmd.arg("larger_than_2056_bytes.txt").succeeds(); - let mut stdout_splitted = result.stdout_str().split(' '); + let mut stdout_split = result.stdout_str().split(' '); - let cksum: i64 = stdout_splitted.next().unwrap().parse().unwrap(); - let bytes_cnt: i64 = stdout_splitted.next().unwrap().parse().unwrap(); + let cksum: i64 = stdout_split.next().unwrap().parse().unwrap(); + let bytes_cnt: i64 = stdout_split.next().unwrap().parse().unwrap(); assert_eq!(cksum, 945_881_979); assert_eq!(bytes_cnt, 2058); diff --git a/tests/by-util/test_comm.rs b/tests/by-util/test_comm.rs index fa8c8beca..01cdcc985 100644 --- a/tests/by-util/test_comm.rs +++ b/tests/by-util/test_comm.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) defaultcheck nocheck + use crate::common::util::*; #[test] @@ -33,19 +35,19 @@ fn ab_dash_three() { } #[test] -fn aempty() { +fn a_empty() { new_ucmd!() .args(&["a", "empty"]) .succeeds() - .stdout_only_fixture("aempty.expected"); + .stdout_only_fixture("aempty.expected"); // spell-checker:disable-line } #[test] -fn emptyempty() { +fn empty_empty() { new_ucmd!() .args(&["empty", "empty"]) .succeeds() - .stdout_only_fixture("emptyempty.expected"); + .stdout_only_fixture("emptyempty.expected"); // spell-checker:disable-line } #[cfg_attr(not(feature = "test_unimplemented"), ignore)] @@ -68,8 +70,8 @@ fn output_delimiter_require_arg() { // even though (info) documentation suggests this is an option // in latest GNU Coreutils comm, it actually is not. -// this test is essentially an alarm in case someone well-intendingly -// implements it. +// this test is essentially an alarm in case some well-intending +// developer implements it. //marked as unimplemented as error message not set yet. #[cfg_attr(not(feature = "test_unimplemented"), ignore)] #[test] diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs index e4d7fdea7..e995cc56c 100644 --- a/tests/by-util/test_cp.rs +++ b/tests/by-util/test_cp.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (flags) reflink (fs) tmpfs + use crate::common::util::*; #[cfg(not(windows))] use std::fs::set_permissions; @@ -926,7 +928,7 @@ fn test_cp_archive() { let (at, mut ucmd) = at_and_ucmd!(); let ts = time::now().to_timespec(); let previous = FileTime::from_unix_time(ts.sec as i64 - 3600, ts.nsec as u32); - // set the file creation/modif an hour ago + // set the file creation/modification an hour ago filetime::set_file_times( at.plus_as_string(TEST_HELLO_WORLD_SOURCE), previous, @@ -1055,7 +1057,7 @@ fn test_cp_preserve_timestamps() { let (at, mut ucmd) = at_and_ucmd!(); let ts = time::now().to_timespec(); let previous = FileTime::from_unix_time(ts.sec as i64 - 3600, ts.nsec as u32); - // set the file creation/modif an hour ago + // set the file creation/modification an hour ago filetime::set_file_times( at.plus_as_string(TEST_HELLO_WORLD_SOURCE), previous, @@ -1084,11 +1086,11 @@ fn test_cp_preserve_timestamps() { #[test] #[cfg(target_os = "linux")] -fn test_cp_dont_preserve_timestamps() { +fn test_cp_no_preserve_timestamps() { let (at, mut ucmd) = at_and_ucmd!(); let ts = time::now().to_timespec(); let previous = FileTime::from_unix_time(ts.sec as i64 - 3600, ts.nsec as u32); - // set the file creation/modif an hour ago + // set the file creation/modification an hour ago filetime::set_file_times( at.plus_as_string(TEST_HELLO_WORLD_SOURCE), previous, @@ -1181,7 +1183,7 @@ fn test_cp_one_file_system() { scene.cmd("umount").arg(mountpoint_path).succeeds(); assert!(!at_dst.file_exists(TEST_MOUNT_OTHER_FILESYSTEM_FILE)); - // Check if the other files were copied from the source folder hirerarchy + // Check if the other files were copied from the source folder hierarchy for entry in WalkDir::new(at_src.as_string()) { let entry = entry.unwrap(); let relative_src = entry diff --git a/tests/by-util/test_csplit.rs b/tests/by-util/test_csplit.rs index ae0885ff8..7eeb584eb 100644 --- a/tests/by-util/test_csplit.rs +++ b/tests/by-util/test_csplit.rs @@ -904,7 +904,7 @@ fn test_no_match() { } #[test] -fn test_too_small_linenum() { +fn test_too_small_line_num() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "/20/", "10", "/40/"]) .succeeds() @@ -921,7 +921,7 @@ fn test_too_small_linenum() { } #[test] -fn test_too_small_linenum_equal() { +fn test_too_small_line_num_equal() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "/20/", "20"]) .succeeds() @@ -937,7 +937,7 @@ fn test_too_small_linenum_equal() { } #[test] -fn test_too_small_linenum_elided() { +fn test_too_small_line_num_elided() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "-z", "/20/", "10", "/40/"]) .succeeds() @@ -953,7 +953,7 @@ fn test_too_small_linenum_elided() { } #[test] -fn test_too_small_linenum_negative_offset() { +fn test_too_small_line_num_negative_offset() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "/20/-5", "10", "/40/"]) .succeeds() @@ -970,7 +970,7 @@ fn test_too_small_linenum_negative_offset() { } #[test] -fn test_too_small_linenum_twice() { +fn test_too_small_line_num_twice() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "/20/", "10", "15", "/40/"]) .succeeds() @@ -988,7 +988,7 @@ fn test_too_small_linenum_twice() { } #[test] -fn test_too_small_linenum_repeat() { +fn test_too_small_line_num_repeat() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "/20/", "10", "{*}"]) .fails() @@ -1020,7 +1020,7 @@ fn test_too_small_linenum_repeat() { } #[test] -fn test_linenum_out_of_range1() { +fn test_line_num_out_of_range1() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "100"]) .fails() @@ -1046,7 +1046,7 @@ fn test_linenum_out_of_range1() { } #[test] -fn test_linenum_out_of_range2() { +fn test_line_num_out_of_range2() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "10", "100"]) .fails() @@ -1073,7 +1073,7 @@ fn test_linenum_out_of_range2() { } #[test] -fn test_linenum_out_of_range3() { +fn test_line_num_out_of_range3() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "40", "{2}"]) .fails() @@ -1100,7 +1100,7 @@ fn test_linenum_out_of_range3() { } #[test] -fn test_linenum_out_of_range4() { +fn test_line_num_out_of_range4() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "40", "{*}"]) .fails() @@ -1141,7 +1141,7 @@ fn test_skip_to_match_negative_offset_before_a_match() { } #[test] -fn test_skip_to_match_negative_offset_before_a_linenum() { +fn test_skip_to_match_negative_offset_before_a_line_num() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "/20/-10", "15"]) .succeeds() @@ -1247,7 +1247,7 @@ fn test_up_to_match_context_underflow() { // the offset is out of range because of the first pattern // NOTE: output different than gnu's: the empty split is written but the rest of the input file is not #[test] -fn test_linenum_range_with_up_to_match1() { +fn test_line_num_range_with_up_to_match1() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "10", "/12/-5"]) .fails() @@ -1277,7 +1277,7 @@ fn test_linenum_range_with_up_to_match1() { // the offset is out of range because more lines are needed than physically available // NOTE: output different than gnu's: the empty split is not written but the rest of the input file is #[test] -fn test_linenum_range_with_up_to_match2() { +fn test_line_num_range_with_up_to_match2() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "10", "/12/-15"]) .fails() @@ -1306,7 +1306,7 @@ fn test_linenum_range_with_up_to_match2() { // NOTE: output different than gnu's: the pattern /10/ is matched but should not #[test] -fn test_linenum_range_with_up_to_match3() { +fn test_line_num_range_with_up_to_match3() { let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["numbers50.txt", "10", "/10/", "-k"]) .fails() diff --git a/tests/by-util/test_date.rs b/tests/by-util/test_date.rs index f4990566a..72747fa66 100644 --- a/tests/by-util/test_date.rs +++ b/tests/by-util/test_date.rs @@ -181,7 +181,7 @@ fn test_date_set_valid_2() { if get_effective_uid() == 0 { let result = new_ucmd!() .arg("--set") - .arg("Sat 20 Mar 2021 14:53:01 AWST") + .arg("Sat 20 Mar 2021 14:53:01 AWST") // spell-checker:disable-line .fails(); result.no_stdout(); assert!(result.stderr_str().starts_with("date: invalid date ")); diff --git a/tests/by-util/test_dircolors.rs b/tests/by-util/test_dircolors.rs index f28074075..fac4161f3 100644 --- a/tests/by-util/test_dircolors.rs +++ b/tests/by-util/test_dircolors.rs @@ -30,14 +30,14 @@ fn test_shell_syntax() { } #[test] -fn test_strutils() { +fn test_str_utils() { let s = " asd#zcv #hk\t\n "; assert_eq!("asd#zcv", s.purify()); let s = "con256asd"; - assert!(s.fnmatch("*[2][3-6][5-9]?sd")); + assert!(s.fnmatch("*[2][3-6][5-9]?sd")); // spell-checker:disable-line - let s = "zxc \t\nqwe jlk hjl"; + let s = "zxc \t\nqwe jlk hjl"; // spell-checker:disable-line let (k, v) = s.split_two(); assert_eq!("zxc", k); assert_eq!("qwe jlk hjl", v); diff --git a/tests/by-util/test_du.rs b/tests/by-util/test_du.rs index 9814e6e8c..8ec0a9c0c 100644 --- a/tests/by-util/test_du.rs +++ b/tests/by-util/test_du.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (paths) sublink subwords + use crate::common::util::*; const SUB_DIR: &str = "subdir/deeper"; diff --git a/tests/by-util/test_echo.rs b/tests/by-util/test_echo.rs index 5d1b68e6c..09ed9658f 100644 --- a/tests/by-util/test_echo.rs +++ b/tests/by-util/test_echo.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) araba merci + use crate::common::util::*; #[test] @@ -185,9 +187,9 @@ fn test_multiple_hyphen_values() { #[test] fn test_hyphen_values_inside_string() { new_ucmd!() - .arg("'\"\n'CXXFLAGS=-g -O2'\n\"'") + .arg("'\"\n'CXXFLAGS=-g -O2'\n\"'") // spell-checker:disable-line .succeeds() - .stdout_contains("CXXFLAGS"); + .stdout_contains("CXXFLAGS"); // spell-checker:disable-line } #[test] diff --git a/tests/by-util/test_env.rs b/tests/by-util/test_env.rs index 23bba57a9..4db3b59bd 100644 --- a/tests/by-util/test_env.rs +++ b/tests/by-util/test_env.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) bamf chdir + #[cfg(not(windows))] use std::fs; diff --git a/tests/by-util/test_factor.rs b/tests/by-util/test_factor.rs index 917d19a49..a3f06ea8a 100644 --- a/tests/by-util/test_factor.rs +++ b/tests/by-util/test_factor.rs @@ -6,6 +6,8 @@ // that was distributed with this source code. #![allow(clippy::unreadable_literal)] +// spell-checker:ignore (methods) hexdigest + use crate::common::util::*; use std::time::SystemTime; @@ -27,13 +29,13 @@ fn test_first_100000_integers() { extern crate sha1; let n_integers = 100_000; - let mut instring = String::new(); + let mut input_string = String::new(); for i in 0..=n_integers { - instring.push_str(&(format!("{} ", i))[..]); + input_string.push_str(&(format!("{} ", i))[..]); } - println!("STDIN='{}'", instring); - let result = new_ucmd!().pipe_in(instring.as_bytes()).succeeds(); + println!("STDIN='{}'", input_string); + let result = new_ucmd!().pipe_in(input_string.as_bytes()).succeeds(); // `seq 0 100000 | factor | sha1sum` => "4ed2d8403934fa1c76fe4b84c5d4b8850299c359" let hash_check = sha1::Sha1::from(result.stdout()).hexdigest(); @@ -95,20 +97,20 @@ fn test_random() { }; // build an input and expected output string from factor - let mut instring = String::new(); - let mut outstring = String::new(); + let mut input_string = String::new(); + let mut output_string = String::new(); for _ in 0..NUM_TESTS { let (product, factors) = rand_gt(1 << 63); - instring.push_str(&(format!("{} ", product))[..]); + input_string.push_str(&(format!("{} ", product))[..]); - outstring.push_str(&(format!("{}:", product))[..]); + output_string.push_str(&(format!("{}:", product))[..]); for factor in factors { - outstring.push_str(&(format!(" {}", factor))[..]); + output_string.push_str(&(format!(" {}", factor))[..]); } - outstring.push('\n'); + output_string.push('\n'); } - run(instring.as_bytes(), outstring.as_bytes()); + run(input_string.as_bytes(), output_string.as_bytes()); } #[test] @@ -120,30 +122,30 @@ fn test_random_big() { println!("rng_seed={:?}", rng_seed); let mut rng = SmallRng::seed_from_u64(rng_seed); - let bitrange_1 = Uniform::new(14_usize, 51); + let bit_range_1 = Uniform::new(14_usize, 51); let mut rand_64 = move || { // first, choose a random number of bits for the first factor - let f_bit_1 = bitrange_1.sample(&mut rng); + let f_bit_1 = bit_range_1.sample(&mut rng); // how many more bits do we need? let rem = 64 - f_bit_1; - // we will have a number of additional factors equal to nfacts + 1 - // where nfacts is in [0, floor(rem/14) ) NOTE half-open interval + // we will have a number of additional factors equal to n_facts + 1 + // where n_facts is in [0, floor(rem/14) ) NOTE half-open interval // Each prime factor is at least 14 bits, hence floor(rem/14) - let nfacts = Uniform::new(0_usize, rem / 14).sample(&mut rng); - // we have to distribute extrabits among the (nfacts + 1) values - let extrabits = rem - (nfacts + 1) * 14; + let n_factors = Uniform::new(0_usize, rem / 14).sample(&mut rng); + // we have to distribute extra_bits among the (n_facts + 1) values + let extra_bits = rem - (n_factors + 1) * 14; // (remember, a Range is a half-open interval) - let extrarange = Uniform::new(0_usize, extrabits + 1); + let extra_range = Uniform::new(0_usize, extra_bits + 1); // to generate an even split of this range, generate n-1 random elements // in the range, add the desired total value to the end, sort this list, // and then compute the sequential differences. let mut f_bits = Vec::new(); - for _ in 0..nfacts { - f_bits.push(extrarange.sample(&mut rng)); + for _ in 0..n_factors { + f_bits.push(extra_range.sample(&mut rng)); } - f_bits.push(extrabits); + f_bits.push(extra_bits); f_bits.sort_unstable(); // compute sequential differences here. We leave off the +14 bits @@ -160,59 +162,62 @@ fn test_random_big() { f_bits.push(f_bit_1 - 14); // index of f_bit_1 in PRIMES_BY_BITS let f_bits = f_bits; - let mut nbits = 0; + let mut n_bits = 0; let mut product = 1_u64; let mut factors = Vec::new(); for bit in f_bits { assert!(bit < 37); - nbits += 14 + bit; + n_bits += 14 + bit; let elm = Uniform::new(0, PRIMES_BY_BITS[bit].len()).sample(&mut rng); let factor = PRIMES_BY_BITS[bit][elm]; factors.push(factor); product *= factor; } - assert_eq!(nbits, 64); + assert_eq!(n_bits, 64); factors.sort_unstable(); (product, factors) }; - let mut instring = String::new(); - let mut outstring = String::new(); + let mut input_string = String::new(); + let mut output_string = String::new(); for _ in 0..NUM_TESTS { let (product, factors) = rand_64(); - instring.push_str(&(format!("{} ", product))[..]); + input_string.push_str(&(format!("{} ", product))[..]); - outstring.push_str(&(format!("{}:", product))[..]); + output_string.push_str(&(format!("{}:", product))[..]); for factor in factors { - outstring.push_str(&(format!(" {}", factor))[..]); + output_string.push_str(&(format!(" {}", factor))[..]); } - outstring.push('\n'); + output_string.push('\n'); } - run(instring.as_bytes(), outstring.as_bytes()); + run(input_string.as_bytes(), output_string.as_bytes()); } #[test] fn test_big_primes() { - let mut instring = String::new(); - let mut outstring = String::new(); + let mut input_string = String::new(); + let mut output_string = String::new(); for prime in PRIMES64 { - instring.push_str(&(format!("{} ", prime))[..]); - outstring.push_str(&(format!("{0}: {0}\n", prime))[..]); + input_string.push_str(&(format!("{} ", prime))[..]); + output_string.push_str(&(format!("{0}: {0}\n", prime))[..]); } - run(instring.as_bytes(), outstring.as_bytes()); + run(input_string.as_bytes(), output_string.as_bytes()); } -fn run(instring: &[u8], outstring: &[u8]) { - println!("STDIN='{}'", String::from_utf8_lossy(instring)); - println!("STDOUT(expected)='{}'", String::from_utf8_lossy(outstring)); +fn run(input_string: &[u8], output_string: &[u8]) { + println!("STDIN='{}'", String::from_utf8_lossy(input_string)); + println!( + "STDOUT(expected)='{}'", + String::from_utf8_lossy(output_string) + ); // now run factor new_ucmd!() - .pipe_in(instring) + .pipe_in(input_string) .run() - .stdout_is(String::from_utf8(outstring.to_owned()).unwrap()); + .stdout_is(String::from_utf8(output_string.to_owned()).unwrap()); } const PRIMES_BY_BITS: &[&[u64]] = &[ diff --git a/tests/by-util/test_fold.rs b/tests/by-util/test_fold.rs index 5224a50dc..1acdadac1 100644 --- a/tests/by-util/test_fold.rs +++ b/tests/by-util/test_fold.rs @@ -282,7 +282,7 @@ fn test_backspace_is_not_word_boundary() { .args(&["-w10", "-s"]) .pipe_in("foobar\x086789abcdef") .succeeds() - .stdout_is("foobar\x086789a\nbcdef"); + .stdout_is("foobar\x086789a\nbcdef"); // spell-checker:disable-line } #[test] @@ -291,7 +291,7 @@ fn test_carriage_return_should_be_preserved() { } #[test] -fn test_carriage_return_overwrriten_char_should_be_preserved() { +fn test_carriage_return_overwritten_char_should_be_preserved() { new_ucmd!().pipe_in("x\ry").succeeds().stdout_is("x\ry"); } @@ -308,9 +308,9 @@ fn test_carriage_return_should_reset_column_count() { fn test_carriage_return_is_not_word_boundary() { new_ucmd!() .args(&["-w6", "-s"]) - .pipe_in("fizz\rbuzz\rfizzbuzz") + .pipe_in("fizz\rbuzz\rfizzbuzz") // spell-checker:disable-line .succeeds() - .stdout_is("fizz\rbuzz\rfizzbu\nzz"); + .stdout_is("fizz\rbuzz\rfizzbu\nzz"); // spell-checker:disable-line } // @@ -496,7 +496,7 @@ fn test_bytewise_backspace_is_not_word_boundary() { .args(&["-w10", "-s", "-b"]) .pipe_in("foobar\x0889abcdef") .succeeds() - .stdout_is("foobar\x0889a\nbcdef"); + .stdout_is("foobar\x0889a\nbcdef"); // spell-checker:disable-line } #[test] @@ -509,7 +509,7 @@ fn test_bytewise_carriage_return_should_be_preserved() { } #[test] -fn test_bytewise_carriage_return_overwrriten_char_should_be_preserved() { +fn test_bytewise_carriage_return_overwritten_char_should_be_preserved() { new_ucmd!() .arg("-b") .pipe_in("x\ry") @@ -530,9 +530,9 @@ fn test_bytewise_carriage_return_should_not_reset_column_count() { fn test_bytewise_carriage_return_is_not_word_boundary() { new_ucmd!() .args(&["-w6", "-s", "-b"]) - .pipe_in("fizz\rbuzz\rfizzbuzz") + .pipe_in("fizz\rbuzz\rfizzbuzz") // spell-checker:disable-line .succeeds() - .stdout_is("fizz\rb\nuzz\rfi\nzzbuzz"); + .stdout_is("fizz\rb\nuzz\rfi\nzzbuzz"); // spell-checker:disable-line } #[test] fn test_obsolete_syntax() { diff --git a/tests/by-util/test_head.rs b/tests/by-util/test_head.rs index f26447636..99e6518fa 100755 --- a/tests/by-util/test_head.rs +++ b/tests/by-util/test_head.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) bogusfile emptyfile + use crate::common::util::*; static INPUT: &str = "lorem_ipsum.txt"; diff --git a/tests/by-util/test_install.rs b/tests/by-util/test_install.rs index 6da357170..3ab5cbdfb 100644 --- a/tests/by-util/test_install.rs +++ b/tests/by-util/test_install.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) helloworld objdump + use crate::common::util::*; use filetime::FileTime; use rust_users::*; diff --git a/tests/by-util/test_join.rs b/tests/by-util/test_join.rs index a8f046851..8dbdadba7 100644 --- a/tests/by-util/test_join.rs +++ b/tests/by-util/test_join.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) autoformat + use crate::common::util::*; #[test] @@ -141,7 +143,7 @@ fn new_line_separated() { } #[test] -fn multitab_character() { +fn tab_multi_character() { new_ucmd!() .arg("semicolon_fields_1.txt") .arg("semicolon_fields_2.txt") diff --git a/tests/by-util/test_kill.rs b/tests/by-util/test_kill.rs index 637aea9a2..fe5d4557a 100644 --- a/tests/by-util/test_kill.rs +++ b/tests/by-util/test_kill.rs @@ -79,9 +79,10 @@ fn test_kill_list_one_signal_from_name() { #[test] fn test_kill_set_bad_signal_name() { + // spell-checker:disable-line new_ucmd!() .arg("-s") - .arg("IAMNOTASIGNAL") + .arg("IAMNOTASIGNAL") // spell-checker:disable-line .fails() .stderr_contains("unknown signal"); } diff --git a/tests/by-util/test_ln.rs b/tests/by-util/test_ln.rs index f2508ecbf..e475e3608 100644 --- a/tests/by-util/test_ln.rs +++ b/tests/by-util/test_ln.rs @@ -65,10 +65,10 @@ fn test_symlink_circular() { } #[test] -fn test_symlink_dont_overwrite() { +fn test_symlink_do_not_overwrite() { let (at, mut ucmd) = at_and_ucmd!(); - let file = "test_symlink_dont_overwrite"; - let link = "test_symlink_dont_overwrite_link"; + let file = "test_symlink_do_not_overwrite"; + let link = "test_symlink_do_not_overwrite_link"; at.touch(file); at.touch(link); @@ -120,7 +120,7 @@ fn test_symlink_interactive() { scene .ucmd() .args(&["-i", "-s", file, link]) - .pipe_in("Yesh") + .pipe_in("Yesh") // spell-checker:disable-line .succeeds() .no_stderr(); diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 9614f561e..20c6b913d 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) READMECAREFULLY birthtime doesntexist oneline somebackup somefile somegroup somehiddenbackup somehiddenfile + #[cfg(unix)] extern crate unix_socket; use crate::common::util::*; @@ -939,7 +941,7 @@ fn test_ls_color() { let a_with_colors = "\x1b[1;34ma\x1b[0m"; let z_with_colors = "\x1b[1;34mz\x1b[0m"; - let nested_dir_with_colors = "\x1b[1;34mnested_dir\x1b[0m"; + let nested_dir_with_colors = "\x1b[1;34mnested_dir\x1b[0m"; // spell-checker:disable-line // Color is disabled by default let result = scene.ucmd().succeeds(); diff --git a/tests/by-util/test_mktemp.rs b/tests/by-util/test_mktemp.rs index d0737764f..d601bad5b 100644 --- a/tests/by-util/test_mktemp.rs +++ b/tests/by-util/test_mktemp.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) gpghome + use crate::common::util::*; use std::path::PathBuf; @@ -8,8 +10,8 @@ static TEST_TEMPLATE2: &str = "temp"; static TEST_TEMPLATE3: &str = "tempX"; static TEST_TEMPLATE4: &str = "tempXX"; static TEST_TEMPLATE5: &str = "tempXXX"; -static TEST_TEMPLATE6: &str = "tempXXXlate"; -static TEST_TEMPLATE7: &str = "XXXtemplate"; +static TEST_TEMPLATE6: &str = "tempXXXlate"; // spell-checker:disable-line +static TEST_TEMPLATE7: &str = "XXXtemplate"; // spell-checker:disable-line #[cfg(unix)] static TEST_TEMPLATE8: &str = "tempXXXl/ate"; #[cfg(windows)] diff --git a/tests/by-util/test_more.rs b/tests/by-util/test_more.rs index cc778f0b4..9b28ee24e 100644 --- a/tests/by-util/test_more.rs +++ b/tests/by-util/test_more.rs @@ -5,12 +5,13 @@ fn test_more_no_arg() { // Reading from stdin is now supported, so this must succeed if atty::is(atty::Stream::Stdout) { new_ucmd!().succeeds(); - } else {} + } else { + } } #[test] fn test_more_dir_arg() { - // Run the test only if there's a valud terminal, else do nothing + // Run the test only if there's a valid terminal, else do nothing // Maybe we could capture the error, i.e. "Device not found" in that case // but I am leaving this for later if atty::is(atty::Stream::Stdout) { @@ -19,5 +20,6 @@ fn test_more_dir_arg() { const EXPECTED_ERROR_MESSAGE: &str = "more: '.' is a directory.\nTry 'more --help' for more information."; assert_eq!(result.stderr_str().trim(), EXPECTED_ERROR_MESSAGE); - } else {} + } else { + } } diff --git a/tests/by-util/test_mv.rs b/tests/by-util/test_mv.rs index beb8f61b9..2f35bf5eb 100644 --- a/tests/by-util/test_mv.rs +++ b/tests/by-util/test_mv.rs @@ -171,7 +171,7 @@ fn test_mv_interactive() { .arg("-i") .arg(file_a) .arg(file_b) - .pipe_in("Yesh") + .pipe_in("Yesh") // spell-checker:disable-line .succeeds() .no_stderr(); diff --git a/tests/by-util/test_nice.rs b/tests/by-util/test_nice.rs index 9e004b98b..25886de78 100644 --- a/tests/by-util/test_nice.rs +++ b/tests/by-util/test_nice.rs @@ -17,7 +17,7 @@ fn test_negative_adjustment() { let res = new_ucmd!().args(&["-n", "-1", "true"]).run(); assert!(res .stderr_str() - .starts_with("nice: warning: setpriority: Permission denied")); + .starts_with("nice: warning: setpriority: Permission denied")); // spell-checker:disable-line } #[test] diff --git a/tests/by-util/test_nl.rs b/tests/by-util/test_nl.rs index 3ca039d19..ce3014311 100644 --- a/tests/by-util/test_nl.rs +++ b/tests/by-util/test_nl.rs @@ -1,7 +1,7 @@ use crate::common::util::*; #[test] -fn test_stdin_nonewline() { +fn test_stdin_no_newline() { new_ucmd!() .pipe_in("No Newline") .run() @@ -41,6 +41,7 @@ fn test_padding_with_overflow() { #[test] fn test_sections_and_styles() { + // spell-checker:disable for &(fixture, output) in &[ ( "section.txt", @@ -63,4 +64,5 @@ fn test_sections_and_styles() { .run() .stdout_is(output); } + // spell-checker:enable } diff --git a/tests/by-util/test_numfmt.rs b/tests/by-util/test_numfmt.rs index b52dbc359..bb29d431e 100644 --- a/tests/by-util/test_numfmt.rs +++ b/tests/by-util/test_numfmt.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (paths) gnutest + use crate::common::util::*; #[test] @@ -231,7 +233,7 @@ fn test_should_skip_leading_space_from_stdin() { .run() .stdout_is("2048\n"); - // multiline + // multi-line new_ucmd!() .args(&["--from=auto"]) .pipe_in("\t1Ki\n 2K") diff --git a/tests/by-util/test_od.rs b/tests/by-util/test_od.rs index fa947aa6e..c21c683dc 100644 --- a/tests/by-util/test_od.rs +++ b/tests/by-util/test_od.rs @@ -8,7 +8,7 @@ use std::fs::File; use std::io::Write; use std::path::Path; -// octal dump of 'abcdefghijklmnopqrstuvwxyz\n' +// octal dump of 'abcdefghijklmnopqrstuvwxyz\n' // spell-checker:disable-line static ALPHA_OUT: &str = " 0000000 061141 062143 063145 064147 065151 066153 067155 070157 0000020 071161 072163 073165 074167 075171 000012 @@ -16,7 +16,7 @@ static ALPHA_OUT: &str = " "; // XXX We could do a better job of ensuring that we have a fresh temp dir to ourselves, -// not a general one full of other proc's leftovers. +// not a general one full of other process leftovers. // Test that od can read one file and dump with default format #[test] @@ -29,6 +29,7 @@ fn test_file() { { let mut f = File::create(&file).unwrap(); + // spell-checker:disable-next-line if f.write_all(b"abcdefghijklmnopqrstuvwxyz\n").is_err() { panic!("Test setup failed - could not write file"); } @@ -55,6 +56,7 @@ fn test_2files() { println!("number: {} letter:{}", n, a); } + // spell-checker:disable-next-line for &(path, data) in &[(&file1, "abcdefghijklmnop"), (&file2, "qrstuvwxyz\n")] { let mut f = File::create(&path).unwrap(); if f.write_all(data.as_bytes()).is_err() { @@ -79,7 +81,7 @@ fn test_2files() { fn test_no_file() { let temp = env::temp_dir(); let tmpdir = Path::new(&temp); - let file = tmpdir.join("}surely'none'would'thus'a'file'name"); + let file = tmpdir.join("}surely'none'would'thus'a'file'name"); // spell-checker:disable-line new_ucmd!().arg(file.as_os_str()).fails(); } @@ -87,7 +89,7 @@ fn test_no_file() { // Test that od reads from stdin instead of a file #[test] fn test_from_stdin() { - let input = "abcdefghijklmnopqrstuvwxyz\n"; + let input = "abcdefghijklmnopqrstuvwxyz\n"; // spell-checker:disable-line new_ucmd!() .arg("--endian=little") .run_piped_stdin(input.as_bytes()) @@ -104,6 +106,7 @@ fn test_from_mixed() { let file1 = tmpdir.join("test-1"); let file3 = tmpdir.join("test-3"); + // spell-checker:disable-next-line let (data1, data2, data3) = ("abcdefg", "hijklmnop", "qrstuvwxyz\n"); for &(path, data) in &[(&file1, data1), (&file3, data3)] { let mut f = File::create(&path).unwrap(); @@ -125,7 +128,7 @@ fn test_from_mixed() { #[test] fn test_multiple_formats() { - let input = "abcdefghijklmnopqrstuvwxyz\n"; + let input = "abcdefghijklmnopqrstuvwxyz\n"; // spell-checker:disable-line new_ucmd!() .arg("-c") .arg("-b") @@ -145,6 +148,7 @@ fn test_multiple_formats() { #[test] fn test_dec() { + // spell-checker:ignore (words) 0xffu8 xffu let input = [ 0u8, 0u8, 1u8, 0u8, 2u8, 0u8, 3u8, 0u8, 0xffu8, 0x7fu8, 0x00u8, 0x80u8, 0x01u8, 0x80u8, ]; @@ -166,12 +170,14 @@ fn test_dec() { #[test] fn test_hex16() { let input: [u8; 9] = [0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0xff]; + // spell-checker:disable let expected_output = unindent( " 0000000 2301 6745 ab89 efcd 00ff 0000011 ", ); + // spell-checker:enable new_ucmd!() .arg("--endian=little") .arg("-x") @@ -288,7 +294,7 @@ fn test_multibyte() { new_ucmd!() .arg("-c") .arg("-w12") - .run_piped_stdin("Universität Tübingen \u{1B000}".as_bytes()) + .run_piped_stdin("Universität Tübingen \u{1B000}".as_bytes()) // spell-checker:disable-line .success() .no_stderr() .stdout_is(unindent( @@ -487,7 +493,7 @@ fn test_alignment_Fx() { } #[test] -fn test_maxuint() { +fn test_max_uint() { let input = [0xFFu8; 8]; let expected_output = unindent( " @@ -505,7 +511,7 @@ fn test_maxuint() { new_ucmd!() .arg("--format=o8") - .arg("-Oobtu8") + .arg("-Oobtu8") // spell-checker:disable-line .arg("-Dd") .arg("--format=u1") .run_piped_stdin(&input[..]) @@ -583,7 +589,7 @@ fn test_invalid_offset() { #[test] fn test_skip_bytes() { - let input = "abcdefghijklmnopq"; + let input = "abcdefghijklmnopq"; // spell-checker:disable-line new_ucmd!() .arg("-c") .arg("--skip-bytes=5") @@ -609,7 +615,7 @@ fn test_skip_bytes_error() { #[test] fn test_read_bytes() { - let input = "abcdefghijklmnopqrstuvwxyz\n12345678"; + let input = "abcdefghijklmnopqrstuvwxyz\n12345678"; // spell-checker:disable-line new_ucmd!() .arg("--endian=little") .arg("--read-bytes=27") @@ -626,7 +632,7 @@ fn test_ascii_dump() { 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0xff, ]; new_ucmd!() - .arg("-tx1zacz") + .arg("-tx1zacz") // spell-checker:disable-line .run_piped_stdin(&input[..]) .no_stderr() .success() @@ -645,7 +651,7 @@ fn test_ascii_dump() { #[test] fn test_filename_parsing() { - // files "a" and "x" both exists, but are no filenames in the commandline below + // files "a" and "x" both exists, but are no filenames in the command line below // "-f" must be treated as a filename, it contains the text: minus lowercase f // so "-f" should not be interpreted as a formatting option. new_ucmd!() @@ -668,7 +674,7 @@ fn test_filename_parsing() { #[test] fn test_stdin_offset() { - let input = "abcdefghijklmnopq"; + let input = "abcdefghijklmnopq"; // spell-checker:disable-line new_ucmd!() .arg("-c") .arg("+5") @@ -703,7 +709,7 @@ fn test_file_offset() { #[test] fn test_traditional() { // note gnu od does not align both lines - let input = "abcdefghijklmnopq"; + let input = "abcdefghijklmnopq"; // spell-checker:disable-line new_ucmd!() .arg("--traditional") .arg("-a") @@ -726,7 +732,7 @@ fn test_traditional() { #[test] fn test_traditional_with_skip_bytes_override() { // --skip-bytes is ignored in this case - let input = "abcdefghijklmnop"; + let input = "abcdefghijklmnop"; // spell-checker:disable-line new_ucmd!() .arg("--traditional") .arg("--skip-bytes=10") @@ -746,7 +752,7 @@ fn test_traditional_with_skip_bytes_override() { #[test] fn test_traditional_with_skip_bytes_non_override() { // no offset specified in the traditional way, so --skip-bytes is used - let input = "abcdefghijklmnop"; + let input = "abcdefghijklmnop"; // spell-checker:disable-line new_ucmd!() .arg("--traditional") .arg("--skip-bytes=10") @@ -776,7 +782,7 @@ fn test_traditional_error() { #[test] fn test_traditional_only_label() { - let input = "abcdefghijklmnopqrstuvwxyz"; + let input = "abcdefghijklmnopqrstuvwxyz"; // spell-checker:disable-line new_ucmd!() .arg("-An") .arg("--traditional") diff --git a/tests/by-util/test_pinky.rs b/tests/by-util/test_pinky.rs index ccabb7345..0813e5e1b 100644 --- a/tests/by-util/test_pinky.rs +++ b/tests/by-util/test_pinky.rs @@ -9,24 +9,24 @@ pub use self::pinky::*; #[test] fn test_capitalize() { - assert_eq!("Zbnmasd", "zbnmasd".capitalize()); - assert_eq!("Abnmasd", "Abnmasd".capitalize()); - assert_eq!("1masd", "1masd".capitalize()); + assert_eq!("Zbnmasd", "zbnmasd".capitalize()); // spell-checker:disable-line + assert_eq!("Abnmasd", "Abnmasd".capitalize()); // spell-checker:disable-line + assert_eq!("1masd", "1masd".capitalize()); // spell-checker:disable-line assert_eq!("", "".capitalize()); } #[test] fn test_long_format() { - let ulogin = "root"; - let pw: Passwd = Passwd::locate(ulogin).unwrap(); + let login = "root"; + let pw: Passwd = Passwd::locate(login).unwrap(); let real_name = pw.user_info().replace("&", &pw.name().capitalize()); new_ucmd!() .arg("-l") - .arg(ulogin) + .arg(login) .succeeds() .stdout_is(format!( "Login name: {:<28}In real life: {}\nDirectory: {:<29}Shell: {}\n\n", - ulogin, + login, real_name, pw.user_dir(), pw.user_shell() @@ -34,11 +34,11 @@ fn test_long_format() { new_ucmd!() .arg("-lb") - .arg(ulogin) + .arg(login) .succeeds() .stdout_is(format!( "Login name: {:<28}In real life: {1}\n\n", - ulogin, real_name + login, real_name )); } diff --git a/tests/by-util/test_pr.rs b/tests/by-util/test_pr.rs new file mode 100644 index 000000000..4fef41ccd --- /dev/null +++ b/tests/by-util/test_pr.rs @@ -0,0 +1,517 @@ +// spell-checker:ignore (ToDO) Sdivide + +use crate::common::util::*; +use chrono::offset::Local; +use chrono::DateTime; +use std::fs::metadata; + +fn file_last_modified_time(ucmd: &UCommand, path: &str) -> String { + let tmp_dir_path = ucmd.get_full_fixture_path(path); + let file_metadata = metadata(tmp_dir_path); + file_metadata + .map(|i| { + i.modified() + .map(|x| { + let date_time: DateTime = x.into(); + date_time.format("%b %d %H:%M %Y").to_string() + }) + .unwrap_or_default() + }) + .unwrap_or_default() +} + +fn now_time() -> String { + Local::now().format("%b %d %H:%M %Y").to_string() +} + +#[test] +fn test_without_any_options() { + 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(&scenario, test_file_path); + scenario + .args(&[test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_numbering_option_with_number_width() { + let test_file_path = "test_num_page.log"; + let expected_test_file_path = "test_num_page_2.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["-n", "2", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[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 mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + let header = "new file"; + scenario + .args(&["--header=new file", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![ + (&"{last_modified_time}".to_string(), &value), + (&"{header}".to_string(), &header.to_string()), + ], + ); + + new_ucmd!() + .args(&["-h", header, test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![ + (&"{last_modified_time}".to_string(), &value), + (&"{header}".to_string(), &header.to_string()), + ], + ); +} + +#[test] +fn test_with_double_space_option() { + let test_file_path = "test_one_page.log"; + let expected_test_file_path = "test_one_page_double_line.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["-d", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); + + new_ucmd!() + .args(&["--double-space", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_first_line_number_option() { + let test_file_path = "test_one_page.log"; + let expected_test_file_path = "test_one_page_first_line.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["-N", "5", "-n", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_first_line_number_long_option() { + let test_file_path = "test_one_page.log"; + let expected_test_file_path = "test_one_page_first_line.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["--first-line-number=5", "-n", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_number_option_with_custom_separator_char() { + let test_file_path = "test_num_page.log"; + let expected_test_file_path = "test_num_page_char.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["-nc", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_number_option_with_custom_separator_char_and_width() { + let test_file_path = "test_num_page.log"; + let expected_test_file_path = "test_num_page_char_one.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["-nc1", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_valid_page_ranges() { + let test_file_path = "test_num_page.log"; + let mut scenario = new_ucmd!(); + scenario + .args(&["--pages=20:5", test_file_path]) + .fails() + .stderr_is("pr: invalid --pages argument '20:5'") + .stdout_is(""); + new_ucmd!() + .args(&["--pages=1:5", test_file_path]) + .succeeds(); + new_ucmd!().args(&["--pages=1", test_file_path]).succeeds(); + new_ucmd!() + .args(&["--pages=-1:5", test_file_path]) + .fails() + .stderr_is("pr: invalid --pages argument '-1:5'") + .stdout_is(""); + new_ucmd!() + .args(&["--pages=1:-5", test_file_path]) + .fails() + .stderr_is("pr: invalid --pages argument '1:-5'") + .stdout_is(""); + new_ucmd!() + .args(&["--pages=5:1", test_file_path]) + .fails() + .stderr_is("pr: invalid --pages argument '5:1'") + .stdout_is(""); +} + +#[test] +fn test_with_page_range() { + let test_file_path = "test.log"; + let expected_test_file_path = "test_page_range_1.log.expected"; + let expected_test_file_path1 = "test_page_range_2.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["--pages=15", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); + + new_ucmd!() + .args(&["+15", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); + + new_ucmd!() + .args(&["--pages=15:17", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path1, + vec![(&"{last_modified_time}".to_string(), &value)], + ); + + new_ucmd!() + .args(&["+15:17", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path1, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_no_header_trailer_option() { + let test_file_path = "test_one_page.log"; + let expected_test_file_path = "test_one_page_no_ht.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["-t", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_page_length_option() { + let test_file_path = "test.log"; + let expected_test_file_path = "test_page_length.log.expected"; + let expected_test_file_path1 = "test_page_length1.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["--pages=2:3", "-l", "100", "-n", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); + + new_ucmd!() + .args(&["--pages=2:3", "-l", "5", "-n", test_file_path]) + .succeeds() + .stdout_is_fixture(expected_test_file_path1); +} + +#[test] +fn test_with_suppress_error_option() { + let test_file_path = "test_num_page.log"; + let mut scenario = new_ucmd!(); + scenario + .args(&["--pages=20:5", "-r", test_file_path]) + .fails() + .stderr_is("") + .stdout_is(""); +} + +#[test] +fn test_with_stdin() { + let expected_file_path = "stdin.log.expected"; + let mut scenario = new_ucmd!(); + scenario + .pipe_in_fixture("stdin.log") + .args(&["--pages=1:2", "-n", "-"]) + .run() + .stdout_is_templated_fixture( + expected_file_path, + vec![(&"{last_modified_time}".to_string(), &now_time())], + ); +} + +#[test] +fn test_with_column() { + let test_file_path = "column.log"; + let expected_test_file_path = "column.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["--pages=3:5", "--column=3", "-n", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); + + new_ucmd!() + .args(&["--pages=3:5", "-3", "-n", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_column_across_option() { + let test_file_path = "column.log"; + let expected_test_file_path = "column_across.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&["--pages=3:5", "--column=3", "-a", "-n", test_file_path]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_column_across_option_and_column_separator() { + let test_file_path = "column.log"; + let expected_test_file_path = "column_across_sep.log.expected"; + let expected_test_file_path1 = "column_across_sep1.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&[ + "--pages=3:5", + "--column=3", + "-s|", + "-a", + "-n", + test_file_path, + ]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); + + new_ucmd!() + .args(&[ + "--pages=3:5", + "--column=3", + "-Sdivide", + "-a", + "-n", + test_file_path, + ]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path1, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_mpr() { + let test_file_path = "column.log"; + let test_file_path1 = "hosts.log"; + let expected_test_file_path = "mpr.log.expected"; + let expected_test_file_path1 = "mpr1.log.expected"; + let expected_test_file_path2 = "mpr2.log.expected"; + new_ucmd!() + .args(&["--pages=1:2", "-m", "-n", test_file_path, test_file_path1]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &now_time())], + ); + + new_ucmd!() + .args(&["--pages=2:4", "-m", "-n", test_file_path, test_file_path1]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path1, + vec![(&"{last_modified_time}".to_string(), &now_time())], + ); + + new_ucmd!() + .args(&[ + "--pages=1:2", + "-l", + "100", + "-n", + "-m", + test_file_path, + test_file_path1, + test_file_path, + ]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path2, + vec![(&"{last_modified_time}".to_string(), &now_time())], + ); +} + +#[test] +fn test_with_mpr_and_column_options() { + let test_file_path = "column.log"; + new_ucmd!() + .args(&["--column=2", "-m", "-n", test_file_path]) + .fails() + .stderr_is("pr: cannot specify number of columns when printing in parallel") + .stdout_is(""); + + new_ucmd!() + .args(&["-a", "-m", "-n", test_file_path]) + .fails() + .stderr_is("pr: cannot specify both printing across and printing in parallel") + .stdout_is(""); +} + +#[test] +fn test_with_offset_space_option() { + let test_file_path = "column.log"; + let expected_test_file_path = "column_spaces_across.log.expected"; + let mut scenario = new_ucmd!(); + let value = file_last_modified_time(&scenario, test_file_path); + scenario + .args(&[ + "-o", + "5", + "--pages=3:5", + "--column=3", + "-a", + "-n", + test_file_path, + ]) + .succeeds() + .stdout_is_templated_fixture( + expected_test_file_path, + vec![(&"{last_modified_time}".to_string(), &value)], + ); +} + +#[test] +fn test_with_pr_core_utils_tests() { + let test_cases = vec![ + ("", vec!["0Ft"], vec!["0F"], 0), + ("", vec!["0Fnt"], vec!["0F"], 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), + ("+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), + ]; + + for test_case in test_cases { + let (flags, input_file, expected_file, return_code) = test_case; + let mut scenario = new_ucmd!(); + let input_file_path = input_file.get(0).unwrap(); + let test_file_path = expected_file.get(0).unwrap(); + let value = file_last_modified_time(&scenario, test_file_path); + let mut arguments: Vec<&str> = flags + .split(' ') + .into_iter() + .filter(|i| i.trim() != "") + .collect::>(); + + arguments.extend(input_file.clone()); + + let scenario_with_args = scenario.args(&arguments); + + let scenario_with_expected_status = if return_code == 0 { + scenario_with_args.succeeds() + } else { + scenario_with_args.fails() + }; + + scenario_with_expected_status.stdout_is_templated_fixture( + test_file_path, + vec![ + (&"{last_modified_time}".to_string(), &value), + (&"{file_name}".to_string(), &input_file_path.to_string()), + ], + ); + } +} + +#[test] +fn test_with_join_lines_option() { + let test_file_1 = "hosts.log"; + let test_file_2 = "test.log"; + let expected_file_path = "joined.log.expected"; + let mut scenario = new_ucmd!(); + scenario + .args(&["+1:2", "-J", "-m", test_file_1, test_file_2]) + .run() + .stdout_is_templated_fixture( + expected_file_path, + vec![(&"{last_modified_time}".to_string(), &now_time())], + ); +} diff --git a/tests/by-util/test_printf.rs b/tests/by-util/test_printf.rs index 1e3e21d0c..b5c9dc3ed 100644 --- a/tests/by-util/test_printf.rs +++ b/tests/by-util/test_printf.rs @@ -43,12 +43,12 @@ fn escaped_octal() { } #[test] -fn escaped_unicode_fourdigit() { +fn escaped_unicode_four_digit() { new_ucmd!().args(&["\\u0125"]).succeeds().stdout_only("ĥ"); } #[test] -fn escaped_unicode_eightdigit() { +fn escaped_unicode_eight_digit() { new_ucmd!() .args(&["\\U00000125"]) .succeeds() @@ -77,7 +77,7 @@ fn sub_string() { } #[test] -fn sub_multifield() { +fn sub_multi_field() { new_ucmd!() .args(&["%s %s", "hello", "world"]) .succeeds() @@ -85,7 +85,7 @@ fn sub_multifield() { } #[test] -fn sub_repeat_formatstr() { +fn sub_repeat_format_str() { new_ucmd!() .args(&["%s.", "hello", "world"]) .succeeds() @@ -101,7 +101,7 @@ fn sub_string_ignore_escapes() { } #[test] -fn sub_bstring_handle_escapes() { +fn sub_b_string_handle_escapes() { new_ucmd!() .args(&["hello %b", "\\tworld"]) .succeeds() @@ -109,7 +109,7 @@ fn sub_bstring_handle_escapes() { } #[test] -fn sub_bstring_ignore_subs() { +fn sub_b_string_ignore_subs() { new_ucmd!() .args(&["hello %b", "world %% %i"]) .succeeds() @@ -133,7 +133,7 @@ fn sub_num_int() { } #[test] -fn sub_num_int_minwidth() { +fn sub_num_int_min_width() { new_ucmd!() .args(&["twenty is %1i", "20"]) .succeeds() @@ -181,11 +181,11 @@ fn sub_num_int_hex_in_neg() { } #[test] -fn sub_num_int_charconst_in() { +fn sub_num_int_char_const_in() { new_ucmd!() - .args(&["ninetyseven is %i", "'a"]) + .args(&["ninety seven is %i", "'a"]) .succeeds() - .stdout_only("ninetyseven is 97"); + .stdout_only("ninety seven is 97"); } #[test] @@ -287,7 +287,7 @@ fn sub_num_hex_float_upper() { } #[test] -fn sub_minwidth() { +fn sub_min_width() { new_ucmd!() .args(&["hello %7s", "world"]) .succeeds() @@ -295,7 +295,7 @@ fn sub_minwidth() { } #[test] -fn sub_minwidth_negative() { +fn sub_min_width_negative() { new_ucmd!() .args(&["hello %-7s", "world"]) .succeeds() @@ -327,7 +327,7 @@ fn sub_int_leading_zeroes() { } #[test] -fn sub_int_leading_zeroes_prio() { +fn sub_int_leading_zeroes_padded() { new_ucmd!() .args(&["%5.4i", "11"]) .succeeds() @@ -359,7 +359,7 @@ fn sub_float_no_octal_in() { } #[test] -fn sub_any_asterisk_firstparam() { +fn sub_any_asterisk_first_param() { new_ucmd!() .args(&["%*i", "3", "11", "4", "12"]) .succeeds() @@ -401,7 +401,7 @@ fn sub_any_asterisk_hex_arg() { #[test] fn sub_any_specifiers_no_params() { new_ucmd!() - .args(&["%ztlhLji", "3"]) + .args(&["%ztlhLji", "3"]) //spell-checker:disable-line .succeeds() .stdout_only("3"); } @@ -409,7 +409,7 @@ fn sub_any_specifiers_no_params() { #[test] fn sub_any_specifiers_after_first_param() { new_ucmd!() - .args(&["%0ztlhLji", "3"]) + .args(&["%0ztlhLji", "3"]) //spell-checker:disable-line .succeeds() .stdout_only("3"); } @@ -417,7 +417,7 @@ fn sub_any_specifiers_after_first_param() { #[test] fn sub_any_specifiers_after_period() { new_ucmd!() - .args(&["%0.ztlhLji", "3"]) + .args(&["%0.ztlhLji", "3"]) //spell-checker:disable-line .succeeds() .stdout_only("3"); } @@ -425,7 +425,7 @@ fn sub_any_specifiers_after_period() { #[test] fn sub_any_specifiers_after_second_param() { new_ucmd!() - .args(&["%0.0ztlhLji", "3"]) + .args(&["%0.0ztlhLji", "3"]) //spell-checker:disable-line .succeeds() .stdout_only("3"); } diff --git a/tests/by-util/test_ptx.rs b/tests/by-util/test_ptx.rs index e44943bfa..c17d473f5 100644 --- a/tests/by-util/test_ptx.rs +++ b/tests/by-util/test_ptx.rs @@ -1,43 +1,43 @@ use crate::common::util::*; #[test] -fn gnu_ext_disabled_roff_no_ref() { +fn gnu_ext_disabled_rightward_no_ref() { new_ucmd!() .args(&["-G", "-R", "input"]) .succeeds() - .stdout_only_fixture("gnu_ext_disabled_roff_no_ref.expected"); + .stdout_only_fixture("gnu_ext_disabled_rightward_no_ref.expected"); } #[test] -fn gnu_ext_disabled_roff_no_ref_empty_word_regexp() { +fn gnu_ext_disabled_rightward_no_ref_empty_word_regexp() { new_ucmd!() .args(&["-G", "-R", "-W", "", "input"]) .succeeds() - .stdout_only_fixture("gnu_ext_disabled_roff_no_ref.expected"); + .stdout_only_fixture("gnu_ext_disabled_rightward_no_ref.expected"); } #[test] -fn gnu_ext_disabled_roff_no_ref_word_regexp_exc_space() { +fn gnu_ext_disabled_rightward_no_ref_word_regexp_exc_space() { new_ucmd!() .args(&["-G", "-R", "-W", "[^\t\n]+", "input"]) .succeeds() - .stdout_only_fixture("gnu_ext_disabled_roff_no_ref_word_regexp_exc_space.expected"); + .stdout_only_fixture("gnu_ext_disabled_rightward_no_ref_word_regexp_exc_space.expected"); } #[test] -fn gnu_ext_disabled_roff_input_ref() { +fn gnu_ext_disabled_rightward_input_ref() { new_ucmd!() .args(&["-G", "-r", "-R", "input"]) .succeeds() - .stdout_only_fixture("gnu_ext_disabled_roff_input_ref.expected"); + .stdout_only_fixture("gnu_ext_disabled_rightward_input_ref.expected"); } #[test] -fn gnu_ext_disabled_roff_auto_ref() { +fn gnu_ext_disabled_rightward_auto_ref() { new_ucmd!() .args(&["-G", "-A", "-R", "input"]) .succeeds() - .stdout_only_fixture("gnu_ext_disabled_roff_auto_ref.expected"); + .stdout_only_fixture("gnu_ext_disabled_rightward_auto_ref.expected"); } #[test] diff --git a/tests/by-util/test_pwd.rs b/tests/by-util/test_pwd.rs index b6a6c87a4..2779b9e62 100644 --- a/tests/by-util/test_pwd.rs +++ b/tests/by-util/test_pwd.rs @@ -9,5 +9,5 @@ fn test_default() { #[test] fn test_failed() { let (_at, mut ucmd) = at_and_ucmd!(); - ucmd.arg("willfail").fails(); + ucmd.arg("will-fail").fails(); } diff --git a/tests/by-util/test_relpath.rs b/tests/by-util/test_relpath.rs index b9c07fb12..44a685c90 100644 --- a/tests/by-util/test_relpath.rs +++ b/tests/by-util/test_relpath.rs @@ -115,12 +115,12 @@ fn test_relpath_with_from_with_d() { #[cfg(not(windows))] assert!(Path::new(&_result_stdout).is_relative()); - // d is not part of subpath -> expect absolut path + // d is not part of subpath -> expect absolute path _result_stdout = scene .ucmd() .arg(to) .arg(from) - .arg("-dnon_existing") + .arg("-dnon_existing") // spell-checker:disable-line .succeeds() .stdout_move_str(); assert!(Path::new(&_result_stdout).is_absolute()); @@ -166,11 +166,11 @@ fn test_relpath_no_from_with_d() { #[cfg(not(windows))] assert!(Path::new(&_result_stdout).is_relative()); - // d is not part of subpath -> expect absolut path + // d is not part of subpath -> expect absolute path let result_stdout = scene .ucmd() .arg(to) - .arg("-dnon_existing") + .arg("-dnon_existing") // spell-checker:disable-line .succeeds() .stdout_move_str(); assert!(Path::new(&result_stdout).is_absolute()); diff --git a/tests/by-util/test_rm.rs b/tests/by-util/test_rm.rs index 2a87038d5..0592be244 100644 --- a/tests/by-util/test_rm.rs +++ b/tests/by-util/test_rm.rs @@ -65,7 +65,7 @@ fn test_rm_interactive() { .arg("-i") .arg(file_a) .arg(file_b) - .pipe_in("Yesh") + .pipe_in("Yesh") // spell-checker:disable-line .succeeds(); assert!(!at.file_exists(file_a)); diff --git a/tests/by-util/test_seq.rs b/tests/by-util/test_seq.rs index a74938377..98eb23598 100644 --- a/tests/by-util/test_seq.rs +++ b/tests/by-util/test_seq.rs @@ -1,5 +1,7 @@ use crate::common::util::*; +// ---- Tests for the big integer based path ---- + #[test] fn test_count_up() { new_ucmd!() @@ -26,6 +28,18 @@ fn test_separator_and_terminator() { .args(&["-s", ",", "-t", "!", "2", "6"]) .run() .stdout_is("2,3,4,5,6!"); + new_ucmd!() + .args(&["-s", ",", "2", "6"]) + .run() + .stdout_is("2,3,4,5,6\n"); + new_ucmd!() + .args(&["-s", "\n", "2", "6"]) + .run() + .stdout_is("2\n3\n4\n5\n6\n"); + new_ucmd!() + .args(&["-s", "\\n", "2", "6"]) + .run() + .stdout_is("2\\n3\\n4\\n5\\n6\n"); } #[test] @@ -45,3 +59,62 @@ fn test_seq_wrong_arg() { fn test_zero_step() { new_ucmd!().args(&["10", "0", "32"]).fails(); } + +#[test] +fn test_big_numbers() { + new_ucmd!() + .args(&[ + "1000000000000000000000000000", + "1000000000000000000000000001", + ]) + .succeeds() + .stdout_only("1000000000000000000000000000\n1000000000000000000000000001\n"); +} + +// ---- Tests for the floating point based path ---- + +#[test] +fn test_count_up_floats() { + new_ucmd!() + .args(&["10.0"]) + .run() + .stdout_is("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n"); +} + +#[test] +fn test_count_down_floats() { + new_ucmd!() + .args(&["--", "5", "-1.0", "1"]) + .run() + .stdout_is("5.0\n4.0\n3.0\n2.0\n1.0\n"); + new_ucmd!() + .args(&["5", "-1", "1.0"]) + .run() + .stdout_is("5\n4\n3\n2\n1\n"); +} + +#[test] +fn test_separator_and_terminator_floats() { + new_ucmd!() + .args(&["-s", ",", "-t", "!", "2.0", "6"]) + .run() + .stdout_is("2.0,3.0,4.0,5.0,6.0!"); +} + +#[test] +fn test_equalize_widths_floats() { + new_ucmd!() + .args(&["-w", "5", "10.0"]) + .run() + .stdout_is("05\n06\n07\n08\n09\n10\n"); +} + +#[test] +fn test_seq_wrong_arg_floats() { + new_ucmd!().args(&["-w", "5", "10.0", "33", "32"]).fails(); +} + +#[test] +fn test_zero_step_floats() { + new_ucmd!().args(&["10.0", "0", "32"]).fails(); +} diff --git a/tests/by-util/test_shuf.rs b/tests/by-util/test_shuf.rs index 106d80a39..cbc01f8cd 100644 --- a/tests/by-util/test_shuf.rs +++ b/tests/by-util/test_shuf.rs @@ -19,7 +19,7 @@ fn test_output_is_random_permutation() { .map(|x| x.parse().unwrap()) .collect(); result_seq.sort_unstable(); - assert_ne!(result.stdout_str(), input, "Output is not randomised"); + assert_ne!(result.stdout_str(), input, "Output is not randomized"); assert_eq!(result_seq, input_seq, "Output is not a permutation"); } diff --git a/tests/by-util/test_sort.rs b/tests/by-util/test_sort.rs index 588ce86bd..d2b447925 100644 --- a/tests/by-util/test_sort.rs +++ b/tests/by-util/test_sort.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (words) ints + use crate::common::util::*; fn test_helper(file_name: &str, possible_args: &[&str]) { @@ -61,7 +63,7 @@ fn test_ext_sort_stable() { } #[test] -fn test_extsort_zero_terminated() { +fn test_ext_sort_zero_terminated() { new_ucmd!() .arg("-z") .arg("-S") @@ -96,7 +98,7 @@ fn test_human_numeric_whitespace() { // This tests where serde often fails when reading back JSON // if it finds a null value #[test] -fn test_extsort_as64_bailout() { +fn test_ext_sort_as64_bailout() { new_ucmd!() .arg("-g") .arg("-S 5K") @@ -290,10 +292,10 @@ fn test_dictionary_order() { fn test_dictionary_order2() { for non_dictionary_order2_param in &["-d"] { new_ucmd!() - .pipe_in("a👦🏻aa b\naaaa b") - .arg(non_dictionary_order2_param) + .pipe_in("a👦🏻aa b\naaaa b") // spell-checker:disable-line + .arg(non_dictionary_order2_param) // spell-checker:disable-line .succeeds() - .stdout_only("a👦🏻aa b\naaaa b\n"); + .stdout_only("a👦🏻aa b\naaaa b\n"); // spell-checker:disable-line } } @@ -301,10 +303,10 @@ fn test_dictionary_order2() { fn test_non_printing_chars() { for non_printing_chars_param in &["-i"] { new_ucmd!() - .pipe_in("a👦🏻aa\naaaa") - .arg(non_printing_chars_param) + .pipe_in("a👦🏻aa\naaaa") // spell-checker:disable-line + .arg(non_printing_chars_param) // spell-checker:disable-line .succeeds() - .stdout_only("a👦🏻aa\naaaa\n"); + .stdout_only("a👦🏻aa\naaaa\n"); // spell-checker:disable-line } } @@ -592,7 +594,7 @@ fn test_keys_ignore_flag() { } #[test] -fn test_doesnt_inherit_key_settings() { +fn test_does_not_inherit_key_settings() { let input = " 1 2 10 diff --git a/tests/by-util/test_split.rs b/tests/by-util/test_split.rs index 1ff8bd8f2..85b28326b 100644 --- a/tests/by-util/test_split.rs +++ b/tests/by-util/test_split.rs @@ -242,7 +242,7 @@ fn test_filter() { .succeeds(); // assert all characters are 'i' / no character is not 'i' - // (assert that command succeded) + // (assert that command succeeded) let glob = Glob::new(&at, ".", r"x[[:alpha:]][[:alpha:]]$"); assert!( glob.collate().iter().find(|&&c| { @@ -265,7 +265,7 @@ fn test_filter_with_env_var_set() { let n_lines = 3; RandomFile::new(&at, name).add_lines(n_lines); - let env_var_value = "somevalue"; + let env_var_value = "some-value"; env::set_var("FILE", &env_var_value); ucmd.args(&[format!("--filter={}", "cat > $FILE").as_str(), name]) .succeeds(); diff --git a/tests/by-util/test_stat.rs b/tests/by-util/test_stat.rs index 6935cc7f9..89dd96752 100644 --- a/tests/by-util/test_stat.rs +++ b/tests/by-util/test_stat.rs @@ -6,20 +6,20 @@ extern crate stat; pub use self::stat::*; #[test] -fn test_scanutil() { +fn test_scanners() { assert_eq!(Some((-5, 2)), "-5zxc".scan_num::()); assert_eq!(Some((51, 2)), "51zxc".scan_num::()); assert_eq!(Some((192, 4)), "+192zxc".scan_num::()); assert_eq!(None, "z192zxc".scan_num::()); assert_eq!(Some(('a', 3)), "141zxc".scan_char(8)); - assert_eq!(Some(('\n', 2)), "12qzxc".scan_char(8)); - assert_eq!(Some(('\r', 1)), "dqzxc".scan_char(16)); - assert_eq!(None, "z2qzxc".scan_char(8)); + assert_eq!(Some(('\n', 2)), "12qzxc".scan_char(8)); // spell-checker:disable-line + assert_eq!(Some(('\r', 1)), "dqzxc".scan_char(16)); // spell-checker:disable-line + assert_eq!(None, "z2qzxc".scan_char(8)); // spell-checker:disable-line } #[test] -fn test_groupnum() { +fn test_group_num() { assert_eq!("12,379,821,234", group_num("12379821234")); assert_eq!("21,234", group_num("21234")); assert_eq!("821,234", group_num("821234")); @@ -97,13 +97,13 @@ fn test_invalid_option() { } #[cfg(any(target_os = "linux", target_vendor = "apple"))] -const NORMAL_FMTSTR: &str = +const NORMAL_FORMAT_STR: &str = "%a %A %b %B %d %D %f %F %g %G %h %i %m %n %o %s %u %U %x %X %y %Y %z %Z"; // avoid "%w %W" (birth/creation) due to `stat` limitations and linux kernel & rust version capability variations #[cfg(any(target_os = "linux"))] -const DEV_FMTSTR: &str = +const DEV_FORMAT_STR: &str = "%a %A %b %B %d %D %f %F %g %G %h %i %m %n %o %s (%t/%T) %u %U %w %W %x %X %y %Y %z %Z"; #[cfg(target_os = "linux")] -const FS_FMTSTR: &str = "%b %c %i %l %n %s %S %t %T"; // avoid "%a %d %f" which can cause test failure due to race conditions +const FS_FORMAT_STR: &str = "%b %c %i %l %n %s %S %t %T"; // avoid "%a %d %f" which can cause test failure due to race conditions #[test] #[cfg(target_os = "linux")] @@ -118,7 +118,7 @@ fn test_terse_fs_format() { #[test] #[cfg(target_os = "linux")] fn test_fs_format() { - let args = ["-f", "-c", FS_FMTSTR, "/dev/shm"]; + let args = ["-f", "-c", FS_FORMAT_STR, "/dev/shm"]; new_ucmd!() .args(&args) .run() @@ -207,7 +207,7 @@ fn test_format_created_seconds() { #[cfg(any(target_os = "linux", target_vendor = "apple"))] #[test] fn test_normal_format() { - let args = ["-c", NORMAL_FMTSTR, "/bin"]; + let args = ["-c", NORMAL_FORMAT_STR, "/bin"]; new_ucmd!() .args(&args) .succeeds() @@ -231,14 +231,14 @@ fn test_symlinks() { ] { if at.file_exists(file) && at.is_symlink(file) { tested = true; - let args = ["-c", NORMAL_FMTSTR, file]; + let args = ["-c", NORMAL_FORMAT_STR, file]; scene .ucmd() .args(&args) .succeeds() .stdout_is(expected_result(&args)); // -L, --dereference follow links - let args = ["-L", "-c", NORMAL_FMTSTR, file]; + let args = ["-L", "-c", NORMAL_FORMAT_STR, file]; scene .ucmd() .args(&args) @@ -261,7 +261,7 @@ fn test_char() { let args = [ "-c", #[cfg(target_os = "linux")] - DEV_FMTSTR, + DEV_FORMAT_STR, #[cfg(target_os = "linux")] "/dev/pts/ptmx", #[cfg(any(target_vendor = "apple"))] @@ -280,7 +280,7 @@ fn test_char() { fn test_multi_files() { let args = [ "-c", - NORMAL_FMTSTR, + NORMAL_FORMAT_STR, "/dev", "/usr/lib", #[cfg(target_os = "linux")] diff --git a/tests/by-util/test_tail.rs b/tests/by-util/test_tail.rs index 9d0462c7a..43e4aaa0c 100644 --- a/tests/by-util/test_tail.rs +++ b/tests/by-util/test_tail.rs @@ -77,7 +77,7 @@ fn test_follow_multiple() { at.append(FOOBAR_2_TXT, first_append); assert_eq!(read_size(&mut child, first_append.len()), first_append); - let second_append = "doce\ntrece\n"; + let second_append = "twenty\nthirty\n"; let expected = at.read("foobar_follow_multiple_appended.expected"); at.append(FOOBAR_TXT, second_append); assert_eq!(read_size(&mut child, expected.len()), expected); @@ -94,7 +94,7 @@ fn test_follow_stdin() { .stdout_is_fixture("follow_stdin.expected"); } -// FixME: test PASSES for usual windows builds, but fails for coverage testing builds (likely related to the specific RUSTFLAGS '-Zpanic_abort_tests -Cpanic=abort') This test also breaks tty settings under bash requiring a 'stty sane' or reset. +// FixME: test PASSES for usual windows builds, but fails for coverage testing builds (likely related to the specific RUSTFLAGS '-Zpanic_abort_tests -Cpanic=abort') This test also breaks tty settings under bash requiring a 'stty sane' or reset. // spell-checker:disable-line #[cfg(disable_until_fixed)] #[test] fn test_follow_with_pid() { @@ -129,7 +129,7 @@ fn test_follow_with_pid() { at.append(FOOBAR_2_TXT, first_append); assert_eq!(read_size(&mut child, first_append.len()), first_append); - let second_append = "doce\ntrece\n"; + let second_append = "twenty\nthirty\n"; let expected = at.read("foobar_follow_multiple_appended.expected"); at.append(FOOBAR_TXT, second_append); assert_eq!(read_size(&mut child, expected.len()), expected); diff --git a/tests/by-util/test_test.rs b/tests/by-util/test_test.rs index 3a55f772a..aaf09d657 100644 --- a/tests/by-util/test_test.rs +++ b/tests/by-util/test_test.rs @@ -8,6 +8,8 @@ // file that was distributed with this source code. // +// spell-checker:ignore (words) pseudofloat + use crate::common::util::*; #[test] @@ -73,13 +75,13 @@ fn test_negated_or() { } #[test] -fn test_strlen_of_nothing() { +fn test_string_length_of_nothing() { // odd but matches GNU, which must interpret -n as a literal here new_ucmd!().arg("-n").succeeds(); } #[test] -fn test_strlen_of_empty() { +fn test_string_length_of_empty() { new_ucmd!().args(&["-n", ""]).run().status_code(1); // STRING equivalent to -n STRING @@ -98,7 +100,7 @@ fn test_zero_len_of_empty() { } #[test] -fn test_solo_paren_is_literal() { +fn test_solo_parenthesis_is_literal() { let scenario = TestScenario::new(util_name!()); let tests = [["("], [")"]]; @@ -167,7 +169,7 @@ fn test_dangling_string_comparison_is_error() { } #[test] -fn test_stringop_is_literal_after_bang() { +fn test_string_operator_is_literal_after_bang() { let scenario = TestScenario::new(util_name!()); let tests = [ ["!", "="], @@ -208,7 +210,7 @@ fn test_pseudofloat_not_equal() { #[test] fn test_negative_arg_is_a_string() { new_ucmd!().arg("-12345").succeeds(); - new_ucmd!().arg("--qwert").succeeds(); + new_ucmd!().arg("--qwert").succeeds(); // spell-checker:disable-line } #[test] @@ -475,12 +477,12 @@ fn test_nonexistent_file_is_not_symlink() { } #[test] -fn test_op_prec_and_or_1() { +fn test_op_precedence_and_or_1() { new_ucmd!().args(&[" ", "-o", "", "-a", ""]).succeeds(); } #[test] -fn test_op_prec_and_or_1_overridden_by_parentheses() { +fn test_op_precedence_and_or_1_overridden_by_parentheses() { new_ucmd!() .args(&["(", " ", "-o", "", ")", "-a", ""]) .run() @@ -488,14 +490,14 @@ fn test_op_prec_and_or_1_overridden_by_parentheses() { } #[test] -fn test_op_prec_and_or_2() { +fn test_op_precedence_and_or_2() { new_ucmd!() .args(&["", "-a", "", "-o", " ", "-a", " "]) .succeeds(); } #[test] -fn test_op_prec_and_or_2_overridden_by_parentheses() { +fn test_op_precedence_and_or_2_overridden_by_parentheses() { new_ucmd!() .args(&["", "-a", "(", "", "-o", " ", ")", "-a", " "]) .run() @@ -529,7 +531,7 @@ fn test_negated_boolean_precedence() { } #[test] -fn test_bang_boolop_precedence() { +fn test_bang_bool_op_precedence() { // For a Boolean combination of two literals, bang inverts the entire expression new_ucmd!().args(&["!", "", "-a", ""]).succeeds(); new_ucmd!().args(&["!", "", "-o", ""]).succeeds(); @@ -564,7 +566,7 @@ fn test_bang_boolop_precedence() { } #[test] -fn test_inverted_parenthetical_boolop_precedence() { +fn test_inverted_parenthetical_bool_op_precedence() { // For a Boolean combination of two literals, bang inverts the entire expression new_ucmd!() .args(&["!", "a value", "-o", "another value"]) @@ -618,6 +620,6 @@ fn test_or_as_filename() { #[test] #[ignore = "GNU considers this an error"] -fn test_strlen_and_nothing() { +fn test_string_length_and_nothing() { new_ucmd!().args(&["-n", "a", "-a"]).run().status_code(2); } diff --git a/tests/by-util/test_timeout.rs b/tests/by-util/test_timeout.rs index 592516cca..28273e00f 100644 --- a/tests/by-util/test_timeout.rs +++ b/tests/by-util/test_timeout.rs @@ -4,7 +4,7 @@ use crate::common::util::*; // the best solution is probably to generate some test binaries that we can call for any // utility that requires executing another program (kill, for instance) #[test] -fn test_subcommand_retcode() { +fn test_subcommand_return_code() { new_ucmd!().arg("1").arg("true").succeeds(); new_ucmd!().arg("1").arg("false").run().status_code(1); diff --git a/tests/by-util/test_touch.rs b/tests/by-util/test_touch.rs index d4d2c058e..3c803e1c6 100644 --- a/tests/by-util/test_touch.rs +++ b/tests/by-util/test_touch.rs @@ -1,3 +1,5 @@ +// spell-checker:ignore (formats) cymdhm cymdhms mdhm mdhms ymdhm ymdhms + extern crate touch; use self::touch::filetime::{self, FileTime}; @@ -354,6 +356,34 @@ fn test_touch_set_date() { assert_eq!(mtime, start_of_year); } +#[test] +fn test_touch_set_date2() { + let (at, mut ucmd) = at_and_ucmd!(); + let file = "test_touch_set_date"; + + ucmd.args(&["-d", "2000-01-23", file]) + .succeeds() + .no_stderr(); + + assert!(at.file_exists(file)); + + let start_of_year = str_to_filetime("%Y%m%d%H%M", "200001230000"); + let (atime, mtime) = get_file_times(&at, file); + assert_eq!(atime, mtime); + assert_eq!(atime, start_of_year); + assert_eq!(mtime, start_of_year); +} + +#[test] +fn test_touch_set_date_wrong_format() { + let (_at, mut ucmd) = at_and_ucmd!(); + let file = "test_touch_set_date_wrong_format"; + + ucmd.args(&["-d", "2005-43-21", file]) + .fails() + .stderr_contains("Unable to parse date: 2005-43-21"); +} + #[test] fn test_touch_mtime_dst_succeeds() { let (at, mut ucmd) = at_and_ucmd!(); @@ -383,13 +413,13 @@ fn is_dst_switch_hour(ts: time::Timespec) -> bool { tm_after.tm_hour == tm.tm_hour + 2 } -// get_dstswitch_hour returns date string for which touch -m -t fails. +// get_dst_switch_hour returns date string for which touch -m -t fails. // For example, in EST (UTC-5), that will be "202003080200" so -// touch -m -t 202003080200 somefile +// touch -m -t 202003080200 file // fails (that date/time does not exist). // In other locales it will be a different date/time, and in some locales // it doesn't exist at all, in which case this function will return None. -fn get_dstswitch_hour() -> Option { +fn get_dst_switch_hour() -> Option { let now = time::now(); // Start from January 1, 2020, 00:00. let mut tm = time::strptime("20200101-0000", "%Y%m%d-%H%M").unwrap(); @@ -415,7 +445,7 @@ fn test_touch_mtime_dst_fails() { let (_at, mut ucmd) = at_and_ucmd!(); let file = "test_touch_set_mtime_dst_fails"; - if let Some(s) = get_dstswitch_hour() { + if let Some(s) = get_dst_switch_hour() { ucmd.args(&["-m", "-t", &s, file]).fails(); } } diff --git a/tests/by-util/test_tr.rs b/tests/by-util/test_tr.rs index 29712b44a..936af2ca8 100644 --- a/tests/by-util/test_tr.rs +++ b/tests/by-util/test_tr.rs @@ -1,7 +1,7 @@ use crate::common::util::*; #[test] -fn test_toupper() { +fn test_to_upper() { new_ucmd!() .args(&["a-z", "A-Z"]) .pipe_in("!abcd!") @@ -80,10 +80,10 @@ fn test_complement2() { #[test] fn test_complement3() { new_ucmd!() - .args(&["-c", "abcdefgh", "123"]) + .args(&["-c", "abcdefgh", "123"]) // spell-checker:disable-line .pipe_in("the cat and the bat") .run() - .stdout_is("3he3ca33a3d33he3ba3"); + .stdout_is("3he3ca33a3d33he3ba3"); // spell-checker:disable-line } #[test] @@ -140,9 +140,9 @@ fn test_translate_and_squeeze() { fn test_translate_and_squeeze_multiple_lines() { new_ucmd!() .args(&["-s", "x", "y"]) - .pipe_in("xxaax\nxaaxx") + .pipe_in("xxaax\nxaaxx") // spell-checker:disable-line .run() - .stdout_is("yaay\nyaay"); + .stdout_is("yaay\nyaay"); // spell-checker:disable-line } #[test] @@ -169,7 +169,7 @@ fn test_set1_longer_than_set2() { .args(&["abc", "xy"]) .pipe_in("abcde") .run() - .stdout_is("xyyde"); + .stdout_is("xyyde"); // spell-checker:disable-line } #[test] @@ -178,7 +178,7 @@ fn test_set1_shorter_than_set2() { .args(&["ab", "xyz"]) .pipe_in("abcde") .run() - .stdout_is("xycde"); + .stdout_is("xycde"); // spell-checker:disable-line } #[test] @@ -187,7 +187,7 @@ fn test_truncate() { .args(&["-t", "abc", "xy"]) .pipe_in("abcde") .run() - .stdout_is("xycde"); + .stdout_is("xycde"); // spell-checker:disable-line } #[test] @@ -196,7 +196,7 @@ fn test_truncate_with_set1_shorter_than_set2() { .args(&["-t", "ab", "xyz"]) .pipe_in("abcde") .run() - .stdout_is("xycde"); + .stdout_is("xycde"); // spell-checker:disable-line } #[test] @@ -216,8 +216,8 @@ fn missing_required_second_arg_fails() { #[test] fn test_interpret_backslash_escapes() { new_ucmd!() - .args(&["abfnrtv", r"\a\b\f\n\r\t\v"]) - .pipe_in("abfnrtv") + .args(&["abfnrtv", r"\a\b\f\n\r\t\v"]) // spell-checker:disable-line + .pipe_in("abfnrtv") // spell-checker:disable-line .succeeds() .stdout_is("\u{7}\u{8}\u{c}\n\r\t\u{b}"); } diff --git a/tests/by-util/test_truncate.rs b/tests/by-util/test_truncate.rs index 04fc826a5..5c3f169a1 100644 --- a/tests/by-util/test_truncate.rs +++ b/tests/by-util/test_truncate.rs @@ -1,15 +1,15 @@ use crate::common::util::*; use std::io::{Seek, SeekFrom, Write}; -static TFILE1: &str = "truncate_test_1"; -static TFILE2: &str = "truncate_test_2"; +static FILE1: &str = "truncate_test_1"; +static FILE2: &str = "truncate_test_2"; #[test] fn test_increase_file_size() { let expected = 5 * 1024; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE1); - ucmd.args(&["-s", "+5K", TFILE1]).succeeds(); + let mut file = at.make_file(FILE1); + ucmd.args(&["-s", "+5K", FILE1]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); @@ -25,8 +25,8 @@ fn test_increase_file_size() { fn test_increase_file_size_kb() { let expected = 5 * 1000; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE1); - ucmd.args(&["-s", "+5KB", TFILE1]).succeeds(); + let mut file = at.make_file(FILE1); + ucmd.args(&["-s", "+5KB", FILE1]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); @@ -43,18 +43,19 @@ fn test_reference() { let expected = 5 * 1000; let scene = TestScenario::new(util_name!()); let at = &scene.fixtures; - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); - // TODO: 'truncate' should create the file in this case because '--no-create' wasn't used - // A FILE argument that does not exist is created. - at.touch(TFILE1); - scene.ucmd().arg("-s").arg("+5KB").arg(TFILE1).succeeds(); + // manpage: "A FILE argument that does not exist is created." + // TODO: 'truncate' does not create the file in this case, + // but should because '--no-create' wasn't specified. + at.touch(FILE1); // TODO: remove this when fixed + scene.ucmd().arg("-s").arg("+5KB").arg(FILE1).succeeds(); scene .ucmd() .arg("--reference") - .arg(TFILE1) - .arg(TFILE2) + .arg(FILE1) + .arg(FILE2) .succeeds(); file.seek(SeekFrom::End(0)).unwrap(); @@ -71,9 +72,9 @@ fn test_reference() { fn test_decrease_file_size() { let expected = 6; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size=-4", TFILE2]).succeeds(); + ucmd.args(&["--size=-4", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -88,9 +89,9 @@ fn test_decrease_file_size() { fn test_space_in_size() { let expected = 4; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size", " 4", TFILE2]).succeeds(); + ucmd.args(&["--size", " 4", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -109,22 +110,22 @@ fn test_failed() { #[test] fn test_failed_2() { let (_at, mut ucmd) = at_and_ucmd!(); - ucmd.args(&[TFILE1]).fails(); + ucmd.args(&[FILE1]).fails(); } #[test] fn test_failed_incorrect_arg() { let (_at, mut ucmd) = at_and_ucmd!(); - ucmd.args(&["-s", "+5A", TFILE1]).fails(); + ucmd.args(&["-s", "+5A", FILE1]).fails(); } #[test] fn test_at_most_shrinks() { let expected = 4; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size", "<4", TFILE2]).succeeds(); + ucmd.args(&["--size", "<4", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -139,9 +140,9 @@ fn test_at_most_shrinks() { fn test_at_most_no_change() { let expected = 10; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size", "<40", TFILE2]).succeeds(); + ucmd.args(&["--size", "<40", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -156,9 +157,9 @@ fn test_at_most_no_change() { fn test_at_least_grows() { let expected = 15; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size", ">15", TFILE2]).succeeds(); + ucmd.args(&["--size", ">15", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -173,9 +174,9 @@ fn test_at_least_grows() { fn test_at_least_no_change() { let expected = 10; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size", ">4", TFILE2]).succeeds(); + ucmd.args(&["--size", ">4", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -190,9 +191,9 @@ fn test_at_least_no_change() { fn test_round_down() { let expected = 8; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size", "/4", TFILE2]).succeeds(); + ucmd.args(&["--size", "/4", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -207,9 +208,9 @@ fn test_round_down() { fn test_round_up() { let expected = 12; let (at, mut ucmd) = at_and_ucmd!(); - let mut file = at.make_file(TFILE2); + let mut file = at.make_file(FILE2); file.write_all(b"1234567890").unwrap(); - ucmd.args(&["--size", "%4", TFILE2]).succeeds(); + ucmd.args(&["--size", "%4", FILE2]).succeeds(); file.seek(SeekFrom::End(0)).unwrap(); let actual = file.seek(SeekFrom::Current(0)).unwrap(); assert!( @@ -224,10 +225,10 @@ fn test_round_up() { fn test_size_and_reference() { let expected = 15; let (at, mut ucmd) = at_and_ucmd!(); - let mut file1 = at.make_file(TFILE1); - let mut file2 = at.make_file(TFILE2); + let mut file1 = at.make_file(FILE1); + let mut file2 = at.make_file(FILE2); file1.write_all(b"1234567890").unwrap(); - ucmd.args(&["--reference", TFILE1, "--size", "+5", TFILE2]) + ucmd.args(&["--reference", FILE1, "--size", "+5", FILE2]) .succeeds(); file2.seek(SeekFrom::End(0)).unwrap(); let actual = file2.seek(SeekFrom::Current(0)).unwrap(); diff --git a/tests/by-util/test_uname.rs b/tests/by-util/test_uname.rs index d878ed7ac..de3f42a6b 100644 --- a/tests/by-util/test_uname.rs +++ b/tests/by-util/test_uname.rs @@ -17,7 +17,7 @@ fn test_uname_processor() { } #[test] -fn test_uname_hwplatform() { +fn test_uname_hardware_platform() { let result = new_ucmd!().arg("-i").succeeds(); assert_eq!(result.stdout_str().trim_end(), "unknown"); } diff --git a/tests/by-util/test_unexpand.rs b/tests/by-util/test_unexpand.rs index e8b880287..692599361 100644 --- a/tests/by-util/test_unexpand.rs +++ b/tests/by-util/test_unexpand.rs @@ -38,7 +38,7 @@ fn unexpand_init_list_1() { } #[test] -fn unexpand_aflag_0() { +fn unexpand_flag_a_0() { new_ucmd!() .args(&["--"]) .pipe_in("e E\nf F\ng G\nh H\n") @@ -47,7 +47,7 @@ fn unexpand_aflag_0() { } #[test] -fn unexpand_aflag_1() { +fn unexpand_flag_a_1() { new_ucmd!() .args(&["-a"]) .pipe_in("e E\nf F\ng G\nh H\n") @@ -56,7 +56,7 @@ fn unexpand_aflag_1() { } #[test] -fn unexpand_aflag_2() { +fn unexpand_flag_a_2() { new_ucmd!() .args(&["-t8"]) .pipe_in("e E\nf F\ng G\nh H\n") diff --git a/tests/by-util/test_uptime.rs b/tests/by-util/test_uptime.rs index d20ad90c9..4dc90eb31 100644 --- a/tests/by-util/test_uptime.rs +++ b/tests/by-util/test_uptime.rs @@ -22,5 +22,5 @@ fn test_uptime_since() { #[test] fn test_failed() { - new_ucmd!().arg("willfail").fails(); + new_ucmd!().arg("will-fail").fails(); } diff --git a/tests/by-util/test_users.rs b/tests/by-util/test_users.rs index 89c3fdd0f..8ceb0eeb8 100644 --- a/tests/by-util/test_users.rs +++ b/tests/by-util/test_users.rs @@ -1,7 +1,7 @@ use crate::common::util::*; #[test] -fn test_users_noarg() { +fn test_users_no_arg() { new_ucmd!().succeeds(); } diff --git a/tests/by-util/test_wc.rs b/tests/by-util/test_wc.rs index 1203c0b1d..88c65c997 100644 --- a/tests/by-util/test_wc.rs +++ b/tests/by-util/test_wc.rs @@ -1,5 +1,7 @@ use crate::common::util::*; +// spell-checker:ignore (flags) lwmcL clmwL ; (path) bogusfile emptyfile manyemptylines moby notrailingnewline onelongemptyline onelongword + #[test] fn test_count_bytes_large_stdin() { for &n in &[ diff --git a/tests/by-util/test_who.rs b/tests/by-util/test_who.rs index 333b03f5b..16444b0cb 100644 --- a/tests/by-util/test_who.rs +++ b/tests/by-util/test_who.rs @@ -1,5 +1,7 @@ use crate::common::util::*; +// spell-checker:ignore (flags) runlevel mesg + #[cfg(any(target_vendor = "apple", target_os = "linux"))] #[test] fn test_count() { diff --git a/tests/common/util.rs b/tests/common/util.rs index 9ce7f0537..d466ba1e9 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -221,6 +221,20 @@ impl CmdResult { let contents = read_scenario_fixture(&self.tmpd, file_rel_path); self.stdout_is(String::from_utf8(contents).unwrap()) } + /// like stdout_is_fixture(...), but replaces the data in fixture file based on values provided in template_vars + /// command output + pub fn stdout_is_templated_fixture>( + &self, + file_rel_path: T, + template_vars: Vec<(&String, &String)>, + ) -> &CmdResult { + let mut contents = + String::from_utf8(read_scenario_fixture(&self.tmpd, file_rel_path)).unwrap(); + for kv in template_vars { + contents = contents.replace(kv.0, kv.1); + } + self.stdout_is(contents) + } /// asserts that the command resulted in stderr stream output that equals the /// passed in value, when both are trimmed of trailing whitespace @@ -632,7 +646,7 @@ impl TestScenario { let tmpd = Rc::new(TempDir::new().unwrap()); let ts = TestScenario { bin_path: { - // Instead of hardcoding the path relative to the current + // Instead of hard coding the path relative to the current // directory, use Cargo's OUT_DIR to find path to executable. // This allows tests to be run using profiles other than debug. let target_dir = path_concat!(env!("OUT_DIR"), "..", "..", "..", PROGNAME); @@ -722,9 +736,10 @@ impl UCommand { cmd.current_dir(curdir.as_ref()); if env_clear { if cfg!(windows) { + // spell-checker:ignore (dll) rsaenh // %SYSTEMROOT% is required on Windows to initialize crypto provider // ... and crypto provider is required for std::rand - // From procmon: RegQueryValue HKLM\SOFTWARE\Microsoft\Cryptography\Defaults\Provider\Microsoft Strong Cryptographic Provider\Image Path + // From `procmon`: RegQueryValue HKLM\SOFTWARE\Microsoft\Cryptography\Defaults\Provider\Microsoft Strong Cryptographic Provider\Image Path // SUCCESS Type: REG_SZ, Length: 66, Data: %SystemRoot%\system32\rsaenh.dll" for (key, _) in env::vars_os() { if key.as_os_str() != "SYSTEMROOT" { @@ -802,7 +817,7 @@ impl UCommand { self } - /// provides stdinput to feed in to the command when spawned + /// provides standard input to feed in to the command when spawned pub fn pipe_in>>(&mut self, input: T) -> &mut UCommand { if self.bytes_into_stdin.is_some() { panic!("{}", MULTIPLE_STDIN_MEANINGLESS); @@ -910,6 +925,11 @@ impl UCommand { cmd_result.failure(); cmd_result } + + pub fn get_full_fixture_path(&self, file_rel_path: &str) -> String { + let tmpdir_path = self.tmpd.as_ref().unwrap().path(); + format!("{}/{}", tmpdir_path.to_str().unwrap(), file_rel_path) + } } pub fn read_size(child: &mut Child, size: usize) -> String { @@ -934,6 +954,7 @@ pub fn vec_of_size(n: usize) -> Vec { /// Sanity checks for test utils #[cfg(test)] mod tests { + // spell-checker:ignore (tests) asdfsadfa use super::*; #[test] @@ -1012,7 +1033,7 @@ mod tests { } #[test] - fn test_no_std_errout() { + fn test_no_stderr_output() { let res = CmdResult { tmpd: None, code: None, diff --git a/tests/fixtures/cat/three_directories_and_file_and_stdin.stderr.expected b/tests/fixtures/cat/three_directories_and_file_and_stdin.stderr.expected index 1a8a33d77..04a2d4be8 100644 --- a/tests/fixtures/cat/three_directories_and_file_and_stdin.stderr.expected +++ b/tests/fixtures/cat/three_directories_and_file_and_stdin.stderr.expected @@ -1,5 +1,5 @@ cat: test_directory3/test_directory4: Is a directory -cat: filewhichdoesnotexist.txt: No such file or directory (os error 2) +cat: file_which_does_not_exist.txt: No such file or directory (os error 2) cat: test_directory3/test_directory5: Is a directory cat: test_directory3/../test_directory3/test_directory5: Is a directory cat: test_directory3: Is a directory diff --git a/tests/fixtures/pr/0F b/tests/fixtures/pr/0F new file mode 100644 index 000000000..223765391 --- /dev/null +++ b/tests/fixtures/pr/0F @@ -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/0Fnt b/tests/fixtures/pr/0Fnt new file mode 100644 index 000000000..9ba3a906c --- /dev/null +++ b/tests/fixtures/pr/0Fnt @@ -0,0 +1,36 @@ + +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 + +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 + +29 xyzxyzxyz XYZXYZXYZ abcabcab +30 456789 123456789 xyzxyzxyz XYZXYZXYZ +1 12345678 +2 3456789 abcdefghi +3 12345678 diff --git a/tests/fixtures/pr/0Ft b/tests/fixtures/pr/0Ft new file mode 100644 index 000000000..bdd599d47 --- /dev/null +++ b/tests/fixtures/pr/0Ft @@ -0,0 +1,35 @@ + 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 + +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 + +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 new file mode 100644 index 000000000..25a9db171 --- /dev/null +++ b/tests/fixtures/pr/3-0F @@ -0,0 +1,198 @@ + + +{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/3a3f-0F b/tests/fixtures/pr/3a3f-0F new file mode 100644 index 000000000..6097374c7 --- /dev/null +++ b/tests/fixtures/pr/3a3f-0F @@ -0,0 +1,22 @@ + + +{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/3f-0F b/tests/fixtures/pr/3f-0F new file mode 100644 index 000000000..d32c1f8f6 --- /dev/null +++ b/tests/fixtures/pr/3f-0F @@ -0,0 +1,36 @@ + + +{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 + \ No newline at end of file diff --git a/tests/fixtures/pr/FnFn b/tests/fixtures/pr/FnFn new file mode 100644 index 000000000..fa91abafc --- /dev/null +++ b/tests/fixtures/pr/FnFn @@ -0,0 +1,68 @@ +1 FF-Test: FF's in Text 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: One Empty Page +7 text\f\f\n; text\f\n\ftext; \f\ftext; +8 \f\f\n; \f\n\f\n; +9 +10 zzzzzzzzzzzzzzzzzzzzzzzzzz123456789 +1 12345678 +2 12345678 +3 line truncation before FF; r_r_o_l-test: +14 456789 123456789 123456789 123456789 + + +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 + + +29 xyzxyzxyz XYZXYZXYZ abcabcab +30 456789 123456789 xyzxyzxyz XYZXYZXYZ +1 12345678 +2 3456789 abcdefghi +3 12345678 +4 12345678 +5 12345678 +6 12345678 +7 12345678 +8 12345678 +9 3456789 abcdefghi +40 DEFGHI 123456789 +41 yzxyzxyz XYZXYZXYZ abcabcab +42 456789 123456789 abcdefghi ABCDEDFHI + + + +43 xyzxyzxyz XYZXYZXYZ abcabcab +44 456789 123456789 xyzxyzxyz XYZXYZXYZ +5 12345678 +6 12345678 +7 12345678 +8 12345678 +9 12345678 +50 12345678 +1 12345678 +2 12345678 +3 12345678 +4 12345678 +55 yzxyzxyz XYZXYZXYZ abcabcab +56 456789 123456789 abcdefghi ABCDEDFHI + +57 xyzxyzxyz XYZXYZXYZ abcabcab +58 456789 123456789 xyzxyzxyz XYZXYZXYZ +9 12345678 +60 DEFGHI 123456789 diff --git a/tests/fixtures/pr/W20l24f-ll b/tests/fixtures/pr/W20l24f-ll new file mode 100644 index 000000000..d95c04c37 --- /dev/null +++ b/tests/fixtures/pr/W20l24f-ll @@ -0,0 +1,106 @@ + + +{last_modified_time} {file_name} Page 1 + + +1<<< -Test: FF's in +2<<< -b -3 / -a -3 +3<<< >>> +4<<< 123456789 1234 + +6<<< -Arangements: +7<<< \f\f\n; text\f +8<<< f\f\n; \f\n\f\ +9<<< >>> +10<<< >>> +1<<< >>> +2<<< >>> +3<<< truncation bef +14<<< 123456789 123 + + +{last_modified_time} {file_name} Page 2 + + + + +{last_modified_time} {file_name} Page 3 + + +15<<< xyzxyzxyz XYZ +16<<< 123456789 xyz +7<<< >>> +8<<< >>> +9<<< >>> +20<<< >>> +1<<< >>> + + +4<<< >>> +5<<< >>> +6<<< >>> +27<<< truncation be +28<<< trunc + + +{last_modified_time} {file_name} Page 4 + + + + +{last_modified_time} {file_name} Page 5 + + +29<<>> +2<<< abcdefghi >>> +3<<< >>> +4<<< >>> +5<<< >>> +6<<< >>> +7<<< >>> +8<<< >>> +9<<< abcdefghi >>> +40<<< 123456789 >> +41<<< XYZXYZXYZ abc +42<<< 123456789 abc + + +{last_modified_time} {file_name} Page 6 + + + + +{last_modified_time} {file_name} Page 7 + + + + +{last_modified_time} {file_name} Page 8 + + +43<<< xyzxyzxyz XYZ +44<<< 123456789 xyz +5<<< >>> +6<<< >>> +7<<< >>> +8<<< >>> +9<<< >>> +50<<< >>> +1<<< >>> +2<<< >>> +3<<< >>> +4<<< >>> +55<<< XYZXYZXYZ abc +56<<< 123456789 abc + + +{last_modified_time} {file_name} Page 9 + + +57<<< xyzxyzxyz XYZ +58<<< 123456789 xyz +9<<< >>> +60<<< 123456789 >> + \ No newline at end of file diff --git a/tests/fixtures/pr/a3-0F b/tests/fixtures/pr/a3-0F new file mode 100644 index 000000000..58aeb07c2 --- /dev/null +++ b/tests/fixtures/pr/a3-0F @@ -0,0 +1,330 @@ + + +{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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fixtures/pr/a3f-0F b/tests/fixtures/pr/a3f-0F new file mode 100644 index 000000000..24939c004 --- /dev/null +++ b/tests/fixtures/pr/a3f-0F @@ -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 b/tests/fixtures/pr/column.log new file mode 100644 index 000000000..7972c09aa --- /dev/null +++ b/tests/fixtures/pr/column.log @@ -0,0 +1,2000 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 +1556 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 +1584 +1585 +1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 +1664 +1665 +1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729 +1730 +1731 +1732 +1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 +1783 +1784 +1785 +1786 +1787 +1788 +1789 +1790 +1791 +1792 +1793 +1794 +1795 +1796 +1797 +1798 +1799 +1800 +1801 +1802 +1803 +1804 +1805 +1806 +1807 +1808 +1809 +1810 +1811 +1812 +1813 +1814 +1815 +1816 +1817 +1818 +1819 +1820 +1821 +1822 +1823 +1824 +1825 +1826 +1827 +1828 +1829 +1830 +1831 +1832 +1833 +1834 +1835 +1836 +1837 +1838 +1839 +1840 +1841 +1842 +1843 +1844 +1845 +1846 +1847 +1848 +1849 +1850 +1851 +1852 +1853 +1854 +1855 +1856 +1857 +1858 +1859 +1860 +1861 +1862 +1863 +1864 +1865 +1866 +1867 +1868 +1869 +1870 +1871 +1872 +1873 +1874 +1875 +1876 +1877 +1878 +1879 +1880 +1881 +1882 +1883 +1884 +1885 +1886 +1887 +1888 +1889 +1890 +1891 +1892 +1893 +1894 +1895 +1896 +1897 +1898 +1899 +1900 +1901 +1902 +1903 +1904 +1905 +1906 +1907 +1908 +1909 +1910 +1911 +1912 +1913 +1914 +1915 +1916 +1917 +1918 +1919 +1920 +1921 +1922 +1923 +1924 +1925 +1926 +1927 +1928 +1929 +1930 +1931 +1932 +1933 +1934 +1935 +1936 +1937 +1938 +1939 +1940 +1941 +1942 +1943 +1944 +1945 +1946 +1947 +1948 +1949 +1950 +1951 +1952 +1953 +1954 +1955 +1956 +1957 +1958 +1959 +1960 +1961 +1962 +1963 +1964 +1965 +1966 +1967 +1968 +1969 +1970 +1971 +1972 +1973 +1974 +1975 +1976 +1977 +1978 +1979 +1980 +1981 +1982 +1983 +1984 +1985 +1986 +1987 +1988 +1989 +1990 +1991 +1992 +1993 +1994 +1995 +1996 +1997 +1998 +1999 +2000 diff --git a/tests/fixtures/pr/column.log.expected b/tests/fixtures/pr/column.log.expected new file mode 100644 index 000000000..e548d4128 --- /dev/null +++ b/tests/fixtures/pr/column.log.expected @@ -0,0 +1,198 @@ + + +{last_modified_time} column.log Page 3 + + + 337 337 393 393 449 449 + 338 338 394 394 450 450 + 339 339 395 395 451 451 + 340 340 396 396 452 452 + 341 341 397 397 453 453 + 342 342 398 398 454 454 + 343 343 399 399 455 455 + 344 344 400 400 456 456 + 345 345 401 401 457 457 + 346 346 402 402 458 458 + 347 347 403 403 459 459 + 348 348 404 404 460 460 + 349 349 405 405 461 461 + 350 350 406 406 462 462 + 351 351 407 407 463 463 + 352 352 408 408 464 464 + 353 353 409 409 465 465 + 354 354 410 410 466 466 + 355 355 411 411 467 467 + 356 356 412 412 468 468 + 357 357 413 413 469 469 + 358 358 414 414 470 470 + 359 359 415 415 471 471 + 360 360 416 416 472 472 + 361 361 417 417 473 473 + 362 362 418 418 474 474 + 363 363 419 419 475 475 + 364 364 420 420 476 476 + 365 365 421 421 477 477 + 366 366 422 422 478 478 + 367 367 423 423 479 479 + 368 368 424 424 480 480 + 369 369 425 425 481 481 + 370 370 426 426 482 482 + 371 371 427 427 483 483 + 372 372 428 428 484 484 + 373 373 429 429 485 485 + 374 374 430 430 486 486 + 375 375 431 431 487 487 + 376 376 432 432 488 488 + 377 377 433 433 489 489 + 378 378 434 434 490 490 + 379 379 435 435 491 491 + 380 380 436 436 492 492 + 381 381 437 437 493 493 + 382 382 438 438 494 494 + 383 383 439 439 495 495 + 384 384 440 440 496 496 + 385 385 441 441 497 497 + 386 386 442 442 498 498 + 387 387 443 443 499 499 + 388 388 444 444 500 500 + 389 389 445 445 501 501 + 390 390 446 446 502 502 + 391 391 447 447 503 503 + 392 392 448 448 504 504 + + + + + + + +{last_modified_time} column.log Page 4 + + + 505 505 561 561 617 617 + 506 506 562 562 618 618 + 507 507 563 563 619 619 + 508 508 564 564 620 620 + 509 509 565 565 621 621 + 510 510 566 566 622 622 + 511 511 567 567 623 623 + 512 512 568 568 624 624 + 513 513 569 569 625 625 + 514 514 570 570 626 626 + 515 515 571 571 627 627 + 516 516 572 572 628 628 + 517 517 573 573 629 629 + 518 518 574 574 630 630 + 519 519 575 575 631 631 + 520 520 576 576 632 632 + 521 521 577 577 633 633 + 522 522 578 578 634 634 + 523 523 579 579 635 635 + 524 524 580 580 636 636 + 525 525 581 581 637 637 + 526 526 582 582 638 638 + 527 527 583 583 639 639 + 528 528 584 584 640 640 + 529 529 585 585 641 641 + 530 530 586 586 642 642 + 531 531 587 587 643 643 + 532 532 588 588 644 644 + 533 533 589 589 645 645 + 534 534 590 590 646 646 + 535 535 591 591 647 647 + 536 536 592 592 648 648 + 537 537 593 593 649 649 + 538 538 594 594 650 650 + 539 539 595 595 651 651 + 540 540 596 596 652 652 + 541 541 597 597 653 653 + 542 542 598 598 654 654 + 543 543 599 599 655 655 + 544 544 600 600 656 656 + 545 545 601 601 657 657 + 546 546 602 602 658 658 + 547 547 603 603 659 659 + 548 548 604 604 660 660 + 549 549 605 605 661 661 + 550 550 606 606 662 662 + 551 551 607 607 663 663 + 552 552 608 608 664 664 + 553 553 609 609 665 665 + 554 554 610 610 666 666 + 555 555 611 611 667 667 + 556 556 612 612 668 668 + 557 557 613 613 669 669 + 558 558 614 614 670 670 + 559 559 615 615 671 671 + 560 560 616 616 672 672 + + + + + + + +{last_modified_time} column.log Page 5 + + + 673 673 729 729 785 785 + 674 674 730 730 786 786 + 675 675 731 731 787 787 + 676 676 732 732 788 788 + 677 677 733 733 789 789 + 678 678 734 734 790 790 + 679 679 735 735 791 791 + 680 680 736 736 792 792 + 681 681 737 737 793 793 + 682 682 738 738 794 794 + 683 683 739 739 795 795 + 684 684 740 740 796 796 + 685 685 741 741 797 797 + 686 686 742 742 798 798 + 687 687 743 743 799 799 + 688 688 744 744 800 800 + 689 689 745 745 801 801 + 690 690 746 746 802 802 + 691 691 747 747 803 803 + 692 692 748 748 804 804 + 693 693 749 749 805 805 + 694 694 750 750 806 806 + 695 695 751 751 807 807 + 696 696 752 752 808 808 + 697 697 753 753 809 809 + 698 698 754 754 810 810 + 699 699 755 755 811 811 + 700 700 756 756 812 812 + 701 701 757 757 813 813 + 702 702 758 758 814 814 + 703 703 759 759 815 815 + 704 704 760 760 816 816 + 705 705 761 761 817 817 + 706 706 762 762 818 818 + 707 707 763 763 819 819 + 708 708 764 764 820 820 + 709 709 765 765 821 821 + 710 710 766 766 822 822 + 711 711 767 767 823 823 + 712 712 768 768 824 824 + 713 713 769 769 825 825 + 714 714 770 770 826 826 + 715 715 771 771 827 827 + 716 716 772 772 828 828 + 717 717 773 773 829 829 + 718 718 774 774 830 830 + 719 719 775 775 831 831 + 720 720 776 776 832 832 + 721 721 777 777 833 833 + 722 722 778 778 834 834 + 723 723 779 779 835 835 + 724 724 780 780 836 836 + 725 725 781 781 837 837 + 726 726 782 782 838 838 + 727 727 783 783 839 839 + 728 728 784 784 840 840 + + + + + diff --git a/tests/fixtures/pr/column_across.log.expected b/tests/fixtures/pr/column_across.log.expected new file mode 100644 index 000000000..9d5a1dc1c --- /dev/null +++ b/tests/fixtures/pr/column_across.log.expected @@ -0,0 +1,198 @@ + + +{last_modified_time} column.log Page 3 + + + 337 337 338 338 339 339 + 340 340 341 341 342 342 + 343 343 344 344 345 345 + 346 346 347 347 348 348 + 349 349 350 350 351 351 + 352 352 353 353 354 354 + 355 355 356 356 357 357 + 358 358 359 359 360 360 + 361 361 362 362 363 363 + 364 364 365 365 366 366 + 367 367 368 368 369 369 + 370 370 371 371 372 372 + 373 373 374 374 375 375 + 376 376 377 377 378 378 + 379 379 380 380 381 381 + 382 382 383 383 384 384 + 385 385 386 386 387 387 + 388 388 389 389 390 390 + 391 391 392 392 393 393 + 394 394 395 395 396 396 + 397 397 398 398 399 399 + 400 400 401 401 402 402 + 403 403 404 404 405 405 + 406 406 407 407 408 408 + 409 409 410 410 411 411 + 412 412 413 413 414 414 + 415 415 416 416 417 417 + 418 418 419 419 420 420 + 421 421 422 422 423 423 + 424 424 425 425 426 426 + 427 427 428 428 429 429 + 430 430 431 431 432 432 + 433 433 434 434 435 435 + 436 436 437 437 438 438 + 439 439 440 440 441 441 + 442 442 443 443 444 444 + 445 445 446 446 447 447 + 448 448 449 449 450 450 + 451 451 452 452 453 453 + 454 454 455 455 456 456 + 457 457 458 458 459 459 + 460 460 461 461 462 462 + 463 463 464 464 465 465 + 466 466 467 467 468 468 + 469 469 470 470 471 471 + 472 472 473 473 474 474 + 475 475 476 476 477 477 + 478 478 479 479 480 480 + 481 481 482 482 483 483 + 484 484 485 485 486 486 + 487 487 488 488 489 489 + 490 490 491 491 492 492 + 493 493 494 494 495 495 + 496 496 497 497 498 498 + 499 499 500 500 501 501 + 502 502 503 503 504 504 + + + + + + + +{last_modified_time} column.log Page 4 + + + 505 505 506 506 507 507 + 508 508 509 509 510 510 + 511 511 512 512 513 513 + 514 514 515 515 516 516 + 517 517 518 518 519 519 + 520 520 521 521 522 522 + 523 523 524 524 525 525 + 526 526 527 527 528 528 + 529 529 530 530 531 531 + 532 532 533 533 534 534 + 535 535 536 536 537 537 + 538 538 539 539 540 540 + 541 541 542 542 543 543 + 544 544 545 545 546 546 + 547 547 548 548 549 549 + 550 550 551 551 552 552 + 553 553 554 554 555 555 + 556 556 557 557 558 558 + 559 559 560 560 561 561 + 562 562 563 563 564 564 + 565 565 566 566 567 567 + 568 568 569 569 570 570 + 571 571 572 572 573 573 + 574 574 575 575 576 576 + 577 577 578 578 579 579 + 580 580 581 581 582 582 + 583 583 584 584 585 585 + 586 586 587 587 588 588 + 589 589 590 590 591 591 + 592 592 593 593 594 594 + 595 595 596 596 597 597 + 598 598 599 599 600 600 + 601 601 602 602 603 603 + 604 604 605 605 606 606 + 607 607 608 608 609 609 + 610 610 611 611 612 612 + 613 613 614 614 615 615 + 616 616 617 617 618 618 + 619 619 620 620 621 621 + 622 622 623 623 624 624 + 625 625 626 626 627 627 + 628 628 629 629 630 630 + 631 631 632 632 633 633 + 634 634 635 635 636 636 + 637 637 638 638 639 639 + 640 640 641 641 642 642 + 643 643 644 644 645 645 + 646 646 647 647 648 648 + 649 649 650 650 651 651 + 652 652 653 653 654 654 + 655 655 656 656 657 657 + 658 658 659 659 660 660 + 661 661 662 662 663 663 + 664 664 665 665 666 666 + 667 667 668 668 669 669 + 670 670 671 671 672 672 + + + + + + + +{last_modified_time} column.log Page 5 + + + 673 673 674 674 675 675 + 676 676 677 677 678 678 + 679 679 680 680 681 681 + 682 682 683 683 684 684 + 685 685 686 686 687 687 + 688 688 689 689 690 690 + 691 691 692 692 693 693 + 694 694 695 695 696 696 + 697 697 698 698 699 699 + 700 700 701 701 702 702 + 703 703 704 704 705 705 + 706 706 707 707 708 708 + 709 709 710 710 711 711 + 712 712 713 713 714 714 + 715 715 716 716 717 717 + 718 718 719 719 720 720 + 721 721 722 722 723 723 + 724 724 725 725 726 726 + 727 727 728 728 729 729 + 730 730 731 731 732 732 + 733 733 734 734 735 735 + 736 736 737 737 738 738 + 739 739 740 740 741 741 + 742 742 743 743 744 744 + 745 745 746 746 747 747 + 748 748 749 749 750 750 + 751 751 752 752 753 753 + 754 754 755 755 756 756 + 757 757 758 758 759 759 + 760 760 761 761 762 762 + 763 763 764 764 765 765 + 766 766 767 767 768 768 + 769 769 770 770 771 771 + 772 772 773 773 774 774 + 775 775 776 776 777 777 + 778 778 779 779 780 780 + 781 781 782 782 783 783 + 784 784 785 785 786 786 + 787 787 788 788 789 789 + 790 790 791 791 792 792 + 793 793 794 794 795 795 + 796 796 797 797 798 798 + 799 799 800 800 801 801 + 802 802 803 803 804 804 + 805 805 806 806 807 807 + 808 808 809 809 810 810 + 811 811 812 812 813 813 + 814 814 815 815 816 816 + 817 817 818 818 819 819 + 820 820 821 821 822 822 + 823 823 824 824 825 825 + 826 826 827 827 828 828 + 829 829 830 830 831 831 + 832 832 833 833 834 834 + 835 835 836 836 837 837 + 838 838 839 839 840 840 + + + + + diff --git a/tests/fixtures/pr/column_across_sep.log.expected b/tests/fixtures/pr/column_across_sep.log.expected new file mode 100644 index 000000000..65c3e71c8 --- /dev/null +++ b/tests/fixtures/pr/column_across_sep.log.expected @@ -0,0 +1,198 @@ + + +{last_modified_time} column.log Page 3 + + + 337 337 | 338 338 | 339 339 + 340 340 | 341 341 | 342 342 + 343 343 | 344 344 | 345 345 + 346 346 | 347 347 | 348 348 + 349 349 | 350 350 | 351 351 + 352 352 | 353 353 | 354 354 + 355 355 | 356 356 | 357 357 + 358 358 | 359 359 | 360 360 + 361 361 | 362 362 | 363 363 + 364 364 | 365 365 | 366 366 + 367 367 | 368 368 | 369 369 + 370 370 | 371 371 | 372 372 + 373 373 | 374 374 | 375 375 + 376 376 | 377 377 | 378 378 + 379 379 | 380 380 | 381 381 + 382 382 | 383 383 | 384 384 + 385 385 | 386 386 | 387 387 + 388 388 | 389 389 | 390 390 + 391 391 | 392 392 | 393 393 + 394 394 | 395 395 | 396 396 + 397 397 | 398 398 | 399 399 + 400 400 | 401 401 | 402 402 + 403 403 | 404 404 | 405 405 + 406 406 | 407 407 | 408 408 + 409 409 | 410 410 | 411 411 + 412 412 | 413 413 | 414 414 + 415 415 | 416 416 | 417 417 + 418 418 | 419 419 | 420 420 + 421 421 | 422 422 | 423 423 + 424 424 | 425 425 | 426 426 + 427 427 | 428 428 | 429 429 + 430 430 | 431 431 | 432 432 + 433 433 | 434 434 | 435 435 + 436 436 | 437 437 | 438 438 + 439 439 | 440 440 | 441 441 + 442 442 | 443 443 | 444 444 + 445 445 | 446 446 | 447 447 + 448 448 | 449 449 | 450 450 + 451 451 | 452 452 | 453 453 + 454 454 | 455 455 | 456 456 + 457 457 | 458 458 | 459 459 + 460 460 | 461 461 | 462 462 + 463 463 | 464 464 | 465 465 + 466 466 | 467 467 | 468 468 + 469 469 | 470 470 | 471 471 + 472 472 | 473 473 | 474 474 + 475 475 | 476 476 | 477 477 + 478 478 | 479 479 | 480 480 + 481 481 | 482 482 | 483 483 + 484 484 | 485 485 | 486 486 + 487 487 | 488 488 | 489 489 + 490 490 | 491 491 | 492 492 + 493 493 | 494 494 | 495 495 + 496 496 | 497 497 | 498 498 + 499 499 | 500 500 | 501 501 + 502 502 | 503 503 | 504 504 + + + + + + + +{last_modified_time} column.log Page 4 + + + 505 505 | 506 506 | 507 507 + 508 508 | 509 509 | 510 510 + 511 511 | 512 512 | 513 513 + 514 514 | 515 515 | 516 516 + 517 517 | 518 518 | 519 519 + 520 520 | 521 521 | 522 522 + 523 523 | 524 524 | 525 525 + 526 526 | 527 527 | 528 528 + 529 529 | 530 530 | 531 531 + 532 532 | 533 533 | 534 534 + 535 535 | 536 536 | 537 537 + 538 538 | 539 539 | 540 540 + 541 541 | 542 542 | 543 543 + 544 544 | 545 545 | 546 546 + 547 547 | 548 548 | 549 549 + 550 550 | 551 551 | 552 552 + 553 553 | 554 554 | 555 555 + 556 556 | 557 557 | 558 558 + 559 559 | 560 560 | 561 561 + 562 562 | 563 563 | 564 564 + 565 565 | 566 566 | 567 567 + 568 568 | 569 569 | 570 570 + 571 571 | 572 572 | 573 573 + 574 574 | 575 575 | 576 576 + 577 577 | 578 578 | 579 579 + 580 580 | 581 581 | 582 582 + 583 583 | 584 584 | 585 585 + 586 586 | 587 587 | 588 588 + 589 589 | 590 590 | 591 591 + 592 592 | 593 593 | 594 594 + 595 595 | 596 596 | 597 597 + 598 598 | 599 599 | 600 600 + 601 601 | 602 602 | 603 603 + 604 604 | 605 605 | 606 606 + 607 607 | 608 608 | 609 609 + 610 610 | 611 611 | 612 612 + 613 613 | 614 614 | 615 615 + 616 616 | 617 617 | 618 618 + 619 619 | 620 620 | 621 621 + 622 622 | 623 623 | 624 624 + 625 625 | 626 626 | 627 627 + 628 628 | 629 629 | 630 630 + 631 631 | 632 632 | 633 633 + 634 634 | 635 635 | 636 636 + 637 637 | 638 638 | 639 639 + 640 640 | 641 641 | 642 642 + 643 643 | 644 644 | 645 645 + 646 646 | 647 647 | 648 648 + 649 649 | 650 650 | 651 651 + 652 652 | 653 653 | 654 654 + 655 655 | 656 656 | 657 657 + 658 658 | 659 659 | 660 660 + 661 661 | 662 662 | 663 663 + 664 664 | 665 665 | 666 666 + 667 667 | 668 668 | 669 669 + 670 670 | 671 671 | 672 672 + + + + + + + +{last_modified_time} column.log Page 5 + + + 673 673 | 674 674 | 675 675 + 676 676 | 677 677 | 678 678 + 679 679 | 680 680 | 681 681 + 682 682 | 683 683 | 684 684 + 685 685 | 686 686 | 687 687 + 688 688 | 689 689 | 690 690 + 691 691 | 692 692 | 693 693 + 694 694 | 695 695 | 696 696 + 697 697 | 698 698 | 699 699 + 700 700 | 701 701 | 702 702 + 703 703 | 704 704 | 705 705 + 706 706 | 707 707 | 708 708 + 709 709 | 710 710 | 711 711 + 712 712 | 713 713 | 714 714 + 715 715 | 716 716 | 717 717 + 718 718 | 719 719 | 720 720 + 721 721 | 722 722 | 723 723 + 724 724 | 725 725 | 726 726 + 727 727 | 728 728 | 729 729 + 730 730 | 731 731 | 732 732 + 733 733 | 734 734 | 735 735 + 736 736 | 737 737 | 738 738 + 739 739 | 740 740 | 741 741 + 742 742 | 743 743 | 744 744 + 745 745 | 746 746 | 747 747 + 748 748 | 749 749 | 750 750 + 751 751 | 752 752 | 753 753 + 754 754 | 755 755 | 756 756 + 757 757 | 758 758 | 759 759 + 760 760 | 761 761 | 762 762 + 763 763 | 764 764 | 765 765 + 766 766 | 767 767 | 768 768 + 769 769 | 770 770 | 771 771 + 772 772 | 773 773 | 774 774 + 775 775 | 776 776 | 777 777 + 778 778 | 779 779 | 780 780 + 781 781 | 782 782 | 783 783 + 784 784 | 785 785 | 786 786 + 787 787 | 788 788 | 789 789 + 790 790 | 791 791 | 792 792 + 793 793 | 794 794 | 795 795 + 796 796 | 797 797 | 798 798 + 799 799 | 800 800 | 801 801 + 802 802 | 803 803 | 804 804 + 805 805 | 806 806 | 807 807 + 808 808 | 809 809 | 810 810 + 811 811 | 812 812 | 813 813 + 814 814 | 815 815 | 816 816 + 817 817 | 818 818 | 819 819 + 820 820 | 821 821 | 822 822 + 823 823 | 824 824 | 825 825 + 826 826 | 827 827 | 828 828 + 829 829 | 830 830 | 831 831 + 832 832 | 833 833 | 834 834 + 835 835 | 836 836 | 837 837 + 838 838 | 839 839 | 840 840 + + + + + diff --git a/tests/fixtures/pr/column_across_sep1.log.expected b/tests/fixtures/pr/column_across_sep1.log.expected new file mode 100644 index 000000000..f9dd454d7 --- /dev/null +++ b/tests/fixtures/pr/column_across_sep1.log.expected @@ -0,0 +1,198 @@ + + +{last_modified_time} column.log Page 3 + + + 337 337 divide 338 338 divide 339 339 + 340 340 divide 341 341 divide 342 342 + 343 343 divide 344 344 divide 345 345 + 346 346 divide 347 347 divide 348 348 + 349 349 divide 350 350 divide 351 351 + 352 352 divide 353 353 divide 354 354 + 355 355 divide 356 356 divide 357 357 + 358 358 divide 359 359 divide 360 360 + 361 361 divide 362 362 divide 363 363 + 364 364 divide 365 365 divide 366 366 + 367 367 divide 368 368 divide 369 369 + 370 370 divide 371 371 divide 372 372 + 373 373 divide 374 374 divide 375 375 + 376 376 divide 377 377 divide 378 378 + 379 379 divide 380 380 divide 381 381 + 382 382 divide 383 383 divide 384 384 + 385 385 divide 386 386 divide 387 387 + 388 388 divide 389 389 divide 390 390 + 391 391 divide 392 392 divide 393 393 + 394 394 divide 395 395 divide 396 396 + 397 397 divide 398 398 divide 399 399 + 400 400 divide 401 401 divide 402 402 + 403 403 divide 404 404 divide 405 405 + 406 406 divide 407 407 divide 408 408 + 409 409 divide 410 410 divide 411 411 + 412 412 divide 413 413 divide 414 414 + 415 415 divide 416 416 divide 417 417 + 418 418 divide 419 419 divide 420 420 + 421 421 divide 422 422 divide 423 423 + 424 424 divide 425 425 divide 426 426 + 427 427 divide 428 428 divide 429 429 + 430 430 divide 431 431 divide 432 432 + 433 433 divide 434 434 divide 435 435 + 436 436 divide 437 437 divide 438 438 + 439 439 divide 440 440 divide 441 441 + 442 442 divide 443 443 divide 444 444 + 445 445 divide 446 446 divide 447 447 + 448 448 divide 449 449 divide 450 450 + 451 451 divide 452 452 divide 453 453 + 454 454 divide 455 455 divide 456 456 + 457 457 divide 458 458 divide 459 459 + 460 460 divide 461 461 divide 462 462 + 463 463 divide 464 464 divide 465 465 + 466 466 divide 467 467 divide 468 468 + 469 469 divide 470 470 divide 471 471 + 472 472 divide 473 473 divide 474 474 + 475 475 divide 476 476 divide 477 477 + 478 478 divide 479 479 divide 480 480 + 481 481 divide 482 482 divide 483 483 + 484 484 divide 485 485 divide 486 486 + 487 487 divide 488 488 divide 489 489 + 490 490 divide 491 491 divide 492 492 + 493 493 divide 494 494 divide 495 495 + 496 496 divide 497 497 divide 498 498 + 499 499 divide 500 500 divide 501 501 + 502 502 divide 503 503 divide 504 504 + + + + + + + +{last_modified_time} column.log Page 4 + + + 505 505 divide 506 506 divide 507 507 + 508 508 divide 509 509 divide 510 510 + 511 511 divide 512 512 divide 513 513 + 514 514 divide 515 515 divide 516 516 + 517 517 divide 518 518 divide 519 519 + 520 520 divide 521 521 divide 522 522 + 523 523 divide 524 524 divide 525 525 + 526 526 divide 527 527 divide 528 528 + 529 529 divide 530 530 divide 531 531 + 532 532 divide 533 533 divide 534 534 + 535 535 divide 536 536 divide 537 537 + 538 538 divide 539 539 divide 540 540 + 541 541 divide 542 542 divide 543 543 + 544 544 divide 545 545 divide 546 546 + 547 547 divide 548 548 divide 549 549 + 550 550 divide 551 551 divide 552 552 + 553 553 divide 554 554 divide 555 555 + 556 556 divide 557 557 divide 558 558 + 559 559 divide 560 560 divide 561 561 + 562 562 divide 563 563 divide 564 564 + 565 565 divide 566 566 divide 567 567 + 568 568 divide 569 569 divide 570 570 + 571 571 divide 572 572 divide 573 573 + 574 574 divide 575 575 divide 576 576 + 577 577 divide 578 578 divide 579 579 + 580 580 divide 581 581 divide 582 582 + 583 583 divide 584 584 divide 585 585 + 586 586 divide 587 587 divide 588 588 + 589 589 divide 590 590 divide 591 591 + 592 592 divide 593 593 divide 594 594 + 595 595 divide 596 596 divide 597 597 + 598 598 divide 599 599 divide 600 600 + 601 601 divide 602 602 divide 603 603 + 604 604 divide 605 605 divide 606 606 + 607 607 divide 608 608 divide 609 609 + 610 610 divide 611 611 divide 612 612 + 613 613 divide 614 614 divide 615 615 + 616 616 divide 617 617 divide 618 618 + 619 619 divide 620 620 divide 621 621 + 622 622 divide 623 623 divide 624 624 + 625 625 divide 626 626 divide 627 627 + 628 628 divide 629 629 divide 630 630 + 631 631 divide 632 632 divide 633 633 + 634 634 divide 635 635 divide 636 636 + 637 637 divide 638 638 divide 639 639 + 640 640 divide 641 641 divide 642 642 + 643 643 divide 644 644 divide 645 645 + 646 646 divide 647 647 divide 648 648 + 649 649 divide 650 650 divide 651 651 + 652 652 divide 653 653 divide 654 654 + 655 655 divide 656 656 divide 657 657 + 658 658 divide 659 659 divide 660 660 + 661 661 divide 662 662 divide 663 663 + 664 664 divide 665 665 divide 666 666 + 667 667 divide 668 668 divide 669 669 + 670 670 divide 671 671 divide 672 672 + + + + + + + +{last_modified_time} column.log Page 5 + + + 673 673 divide 674 674 divide 675 675 + 676 676 divide 677 677 divide 678 678 + 679 679 divide 680 680 divide 681 681 + 682 682 divide 683 683 divide 684 684 + 685 685 divide 686 686 divide 687 687 + 688 688 divide 689 689 divide 690 690 + 691 691 divide 692 692 divide 693 693 + 694 694 divide 695 695 divide 696 696 + 697 697 divide 698 698 divide 699 699 + 700 700 divide 701 701 divide 702 702 + 703 703 divide 704 704 divide 705 705 + 706 706 divide 707 707 divide 708 708 + 709 709 divide 710 710 divide 711 711 + 712 712 divide 713 713 divide 714 714 + 715 715 divide 716 716 divide 717 717 + 718 718 divide 719 719 divide 720 720 + 721 721 divide 722 722 divide 723 723 + 724 724 divide 725 725 divide 726 726 + 727 727 divide 728 728 divide 729 729 + 730 730 divide 731 731 divide 732 732 + 733 733 divide 734 734 divide 735 735 + 736 736 divide 737 737 divide 738 738 + 739 739 divide 740 740 divide 741 741 + 742 742 divide 743 743 divide 744 744 + 745 745 divide 746 746 divide 747 747 + 748 748 divide 749 749 divide 750 750 + 751 751 divide 752 752 divide 753 753 + 754 754 divide 755 755 divide 756 756 + 757 757 divide 758 758 divide 759 759 + 760 760 divide 761 761 divide 762 762 + 763 763 divide 764 764 divide 765 765 + 766 766 divide 767 767 divide 768 768 + 769 769 divide 770 770 divide 771 771 + 772 772 divide 773 773 divide 774 774 + 775 775 divide 776 776 divide 777 777 + 778 778 divide 779 779 divide 780 780 + 781 781 divide 782 782 divide 783 783 + 784 784 divide 785 785 divide 786 786 + 787 787 divide 788 788 divide 789 789 + 790 790 divide 791 791 divide 792 792 + 793 793 divide 794 794 divide 795 795 + 796 796 divide 797 797 divide 798 798 + 799 799 divide 800 800 divide 801 801 + 802 802 divide 803 803 divide 804 804 + 805 805 divide 806 806 divide 807 807 + 808 808 divide 809 809 divide 810 810 + 811 811 divide 812 812 divide 813 813 + 814 814 divide 815 815 divide 816 816 + 817 817 divide 818 818 divide 819 819 + 820 820 divide 821 821 divide 822 822 + 823 823 divide 824 824 divide 825 825 + 826 826 divide 827 827 divide 828 828 + 829 829 divide 830 830 divide 831 831 + 832 832 divide 833 833 divide 834 834 + 835 835 divide 836 836 divide 837 837 + 838 838 divide 839 839 divide 840 840 + + + + + diff --git a/tests/fixtures/pr/column_spaces_across.log.expected b/tests/fixtures/pr/column_spaces_across.log.expected new file mode 100644 index 000000000..037dd814b --- /dev/null +++ b/tests/fixtures/pr/column_spaces_across.log.expected @@ -0,0 +1,198 @@ + + +{last_modified_time} column.log Page 3 + + + 337 337 338 338 339 339 + 340 340 341 341 342 342 + 343 343 344 344 345 345 + 346 346 347 347 348 348 + 349 349 350 350 351 351 + 352 352 353 353 354 354 + 355 355 356 356 357 357 + 358 358 359 359 360 360 + 361 361 362 362 363 363 + 364 364 365 365 366 366 + 367 367 368 368 369 369 + 370 370 371 371 372 372 + 373 373 374 374 375 375 + 376 376 377 377 378 378 + 379 379 380 380 381 381 + 382 382 383 383 384 384 + 385 385 386 386 387 387 + 388 388 389 389 390 390 + 391 391 392 392 393 393 + 394 394 395 395 396 396 + 397 397 398 398 399 399 + 400 400 401 401 402 402 + 403 403 404 404 405 405 + 406 406 407 407 408 408 + 409 409 410 410 411 411 + 412 412 413 413 414 414 + 415 415 416 416 417 417 + 418 418 419 419 420 420 + 421 421 422 422 423 423 + 424 424 425 425 426 426 + 427 427 428 428 429 429 + 430 430 431 431 432 432 + 433 433 434 434 435 435 + 436 436 437 437 438 438 + 439 439 440 440 441 441 + 442 442 443 443 444 444 + 445 445 446 446 447 447 + 448 448 449 449 450 450 + 451 451 452 452 453 453 + 454 454 455 455 456 456 + 457 457 458 458 459 459 + 460 460 461 461 462 462 + 463 463 464 464 465 465 + 466 466 467 467 468 468 + 469 469 470 470 471 471 + 472 472 473 473 474 474 + 475 475 476 476 477 477 + 478 478 479 479 480 480 + 481 481 482 482 483 483 + 484 484 485 485 486 486 + 487 487 488 488 489 489 + 490 490 491 491 492 492 + 493 493 494 494 495 495 + 496 496 497 497 498 498 + 499 499 500 500 501 501 + 502 502 503 503 504 504 + + + + + + + +{last_modified_time} column.log Page 4 + + + 505 505 506 506 507 507 + 508 508 509 509 510 510 + 511 511 512 512 513 513 + 514 514 515 515 516 516 + 517 517 518 518 519 519 + 520 520 521 521 522 522 + 523 523 524 524 525 525 + 526 526 527 527 528 528 + 529 529 530 530 531 531 + 532 532 533 533 534 534 + 535 535 536 536 537 537 + 538 538 539 539 540 540 + 541 541 542 542 543 543 + 544 544 545 545 546 546 + 547 547 548 548 549 549 + 550 550 551 551 552 552 + 553 553 554 554 555 555 + 556 556 557 557 558 558 + 559 559 560 560 561 561 + 562 562 563 563 564 564 + 565 565 566 566 567 567 + 568 568 569 569 570 570 + 571 571 572 572 573 573 + 574 574 575 575 576 576 + 577 577 578 578 579 579 + 580 580 581 581 582 582 + 583 583 584 584 585 585 + 586 586 587 587 588 588 + 589 589 590 590 591 591 + 592 592 593 593 594 594 + 595 595 596 596 597 597 + 598 598 599 599 600 600 + 601 601 602 602 603 603 + 604 604 605 605 606 606 + 607 607 608 608 609 609 + 610 610 611 611 612 612 + 613 613 614 614 615 615 + 616 616 617 617 618 618 + 619 619 620 620 621 621 + 622 622 623 623 624 624 + 625 625 626 626 627 627 + 628 628 629 629 630 630 + 631 631 632 632 633 633 + 634 634 635 635 636 636 + 637 637 638 638 639 639 + 640 640 641 641 642 642 + 643 643 644 644 645 645 + 646 646 647 647 648 648 + 649 649 650 650 651 651 + 652 652 653 653 654 654 + 655 655 656 656 657 657 + 658 658 659 659 660 660 + 661 661 662 662 663 663 + 664 664 665 665 666 666 + 667 667 668 668 669 669 + 670 670 671 671 672 672 + + + + + + + +{last_modified_time} column.log Page 5 + + + 673 673 674 674 675 675 + 676 676 677 677 678 678 + 679 679 680 680 681 681 + 682 682 683 683 684 684 + 685 685 686 686 687 687 + 688 688 689 689 690 690 + 691 691 692 692 693 693 + 694 694 695 695 696 696 + 697 697 698 698 699 699 + 700 700 701 701 702 702 + 703 703 704 704 705 705 + 706 706 707 707 708 708 + 709 709 710 710 711 711 + 712 712 713 713 714 714 + 715 715 716 716 717 717 + 718 718 719 719 720 720 + 721 721 722 722 723 723 + 724 724 725 725 726 726 + 727 727 728 728 729 729 + 730 730 731 731 732 732 + 733 733 734 734 735 735 + 736 736 737 737 738 738 + 739 739 740 740 741 741 + 742 742 743 743 744 744 + 745 745 746 746 747 747 + 748 748 749 749 750 750 + 751 751 752 752 753 753 + 754 754 755 755 756 756 + 757 757 758 758 759 759 + 760 760 761 761 762 762 + 763 763 764 764 765 765 + 766 766 767 767 768 768 + 769 769 770 770 771 771 + 772 772 773 773 774 774 + 775 775 776 776 777 777 + 778 778 779 779 780 780 + 781 781 782 782 783 783 + 784 784 785 785 786 786 + 787 787 788 788 789 789 + 790 790 791 791 792 792 + 793 793 794 794 795 795 + 796 796 797 797 798 798 + 799 799 800 800 801 801 + 802 802 803 803 804 804 + 805 805 806 806 807 807 + 808 808 809 809 810 810 + 811 811 812 812 813 813 + 814 814 815 815 816 816 + 817 817 818 818 819 819 + 820 820 821 821 822 822 + 823 823 824 824 825 825 + 826 826 827 827 828 828 + 829 829 830 830 831 831 + 832 832 833 833 834 834 + 835 835 836 836 837 837 + 838 838 839 839 840 840 + + + + + diff --git a/tests/fixtures/pr/hosts.log b/tests/fixtures/pr/hosts.log new file mode 100644 index 000000000..8d725920c --- /dev/null +++ b/tests/fixtures/pr/hosts.log @@ -0,0 +1,11 @@ +## +# Host Database +# +# localhost is used to configure the loopback interface +# when the system is booting. Do not change this entry. +## +127.0.0.1 localhost +127.0.0.1 Techopss-MacBook-Pro.local +127.0.0.1 tilakpr +255.255.255.255 broadcasthost +::1 localhost \ No newline at end of file diff --git a/tests/fixtures/pr/joined.log.expected b/tests/fixtures/pr/joined.log.expected new file mode 100644 index 000000000..a9cee6e4f --- /dev/null +++ b/tests/fixtures/pr/joined.log.expected @@ -0,0 +1,132 @@ + + +{last_modified_time} Page 1 + + +##ntation processAirPortStateChanges]: pppConnectionState 0 +# Host DatabaseMon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +#Mon Dec 10 11:42:56.705 Info: 802.1X changed +# localhost is used to configure the loopback interfaceMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +# when the system is booting. Do not change this entry.Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +##Mon Dec 10 11:42:56.854 Info: 802.1X changed +127.0.0.1 localhostMon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +127.0.0.1 Techopss-MacBook-Pro.localMon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +127.0.0.1 tilakprMon Dec 10 11:42:57.002 Info: 802.1X changed +255.255.255.255 broadcasthostMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +::1 localhostMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + + + +{last_modified_time} Page 2 + + +Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: APPLE80211_M_ROAM_END (en0) +Mon Dec 10 11:42:59.372 Info: Roaming ended on interface en0 +Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: RSN_HANDSHAKE_DONE (en0) +Mon Dec 10 11:42:59.373 Info: -[CWXPCInterfaceContext setRoamInProgress:reason:]_block_invoke: roam status metric data: CWAWDMetricRoamStatus: status:0 security: 4 profile:5 origin:<34fcb9>(-69) target:<6cf37f>(-56) latency:6.083439s +Mon Dec 10 11:42:59.373 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90046 +Mon Dec 10 11:42:59.373 Info: RESUME AWDL for interface en0, reason=Roam token=2685 +Mon Dec 10 11:42:59.373 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=5] +Mon Dec 10 11:42:59.374 Info: -[CWXPCInterfaceContext __setAWDLOperatingMode:interface:error:]: attempting to set AWDL mode to 0 +Mon Dec 10 11:43:01.072 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP' +Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP +Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: DHCP airport_changed = 1 +Mon Dec 10 11:43:01.073 Info: -[CWXPCSubsystem internal_submitIPConfigLatencyMetric:leaseDuration:]: IPConfig Latency metric data: CWAWDMetricIPConfigLatencyData: DHCP latency: 29010 msecs, duration: 480 mins, security: 4 +Mon Dec 10 11:43:01.073 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90007 +Mon Dec 10 11:43:01.073 SC: _setDHCPMessage: dhcpInfoKey "State:/Network/Interface/en0/AirPort/DHCP Message" = (null) +Mon Dec 10 11:43:10.369 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:10.369 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=162 Mbps +Mon Dec 10 11:43:10.369 Info: link quality changed +Mon Dec 10 11:43:23.376 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:23.377 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=243 Mbps +Mon Dec 10 11:43:23.377 Info: link quality changed +Mon Dec 10 11:43:28.380 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:28.380 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 11:43:28.380 Info: link quality changed +Mon Dec 10 11:43:31.744 AutoJoin: BACKGROUND SCAN request on interface en0 with SSID list (null) +Mon Dec 10 11:43:31.747 Scan: Cache-assisted scan request on channel 1 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 2 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 3 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.748 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.748 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.748 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.748 [channelNumber=3(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.748 )} took 0.0025 seconds, returned 10 results +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 4 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 5 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 6 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.749 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.749 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.749 )} took 0.0008 seconds, returned 7 results +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 7 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 8 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 9 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.749 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.749 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=9(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.749 )} took 0.0002 seconds, returned 1 results +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 10 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 11 does not require a live scan +Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 12 does not require a live scan + + + + + diff --git a/tests/fixtures/pr/l24-FF b/tests/fixtures/pr/l24-FF new file mode 100644 index 000000000..de219b2fb --- /dev/null +++ b/tests/fixtures/pr/l24-FF @@ -0,0 +1,312 @@ + + +{last_modified_time} {file_name} Page 1 + + +1 FF-Test: FF's in Text 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: One Empty Page +7 text\f\f\n; text\f\n\ftext; \f\ftext; +8 \f\f\n; \f\n\f\n; +9 +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 2 + + + + + + + + + + + + + + + + + + + + + + + +{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 + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 6 + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 7 + + +29 xyzxyzxyz XYZXYZXYZ abcabcab +30 456789 123456789 xyzxyzxyz XYZXYZXYZ +1 12345678 +2 3456789 abcdefghi +3 12345678 +4 12345678 +5 12345678 +6 12345678 +7 12345678 +8 12345678 +9 3456789 abcdefghi +40 DEFGHI 123456789 +41 yzxyzxyz XYZXYZXYZ abcabcab +42 456789 123456789 abcdefghi ABCDEDFHI + + + + + + + +{last_modified_time} {file_name} Page 8 + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 9 + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 10 + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 11 + + +43 xyzxyzxyz XYZXYZXYZ abcabcab +44 456789 123456789 xyzxyzxyz XYZXYZXYZ +5 12345678 +6 12345678 +7 12345678 +8 12345678 +9 12345678 +50 12345678 +1 12345678 +2 12345678 +3 12345678 +4 12345678 +55 yzxyzxyz XYZXYZXYZ abcabcab +56 456789 123456789 abcdefghi ABCDEDFHI + + + + + + + +{last_modified_time} {file_name} Page 12 + + + + + + + + + + + + + + + + + + + + + + + +{last_modified_time} {file_name} Page 13 + + +57 xyzxyzxyz XYZXYZXYZ abcabcab +58 456789 123456789 xyzxyzxyz XYZXYZXYZ +9 12345678 +60 DEFGHI 123456789 + + + + + + + + + + + + + + + diff --git a/tests/fixtures/pr/mpr.log.expected b/tests/fixtures/pr/mpr.log.expected new file mode 100644 index 000000000..f6fffd191 --- /dev/null +++ b/tests/fixtures/pr/mpr.log.expected @@ -0,0 +1,132 @@ + + +{last_modified_time} Page 1 + + + 1 1 ## + 2 2 # Host Database + 3 3 # + 4 4 # localhost is used to configure th + 5 5 # when the system is booting. Do n + 6 6 ## + 7 7 127.0.0.1 localhost + 8 8 127.0.0.1 Techopss-MacBook-Pro.loca + 9 9 127.0.0.1 tilakpr + 10 10 255.255.255.255 broadcasthost + 11 11 ::1 localhost + 12 12 + 13 13 + 14 14 + 15 15 + 16 16 + 17 17 + 18 18 + 19 19 + 20 20 + 21 21 + 22 22 + 23 23 + 24 24 + 25 25 + 26 26 + 27 27 + 28 28 + 29 29 + 30 30 + 31 31 + 32 32 + 33 33 + 34 34 + 35 35 + 36 36 + 37 37 + 38 38 + 39 39 + 40 40 + 41 41 + 42 42 + 43 43 + 44 44 + 45 45 + 46 46 + 47 47 + 48 48 + 49 49 + 50 50 + 51 51 + 52 52 + 53 53 + 54 54 + 55 55 + 56 56 + + + + + + + +{last_modified_time} Page 2 + + + 57 57 + 58 58 + 59 59 + 60 60 + 61 61 + 62 62 + 63 63 + 64 64 + 65 65 + 66 66 + 67 67 + 68 68 + 69 69 + 70 70 + 71 71 + 72 72 + 73 73 + 74 74 + 75 75 + 76 76 + 77 77 + 78 78 + 79 79 + 80 80 + 81 81 + 82 82 + 83 83 + 84 84 + 85 85 + 86 86 + 87 87 + 88 88 + 89 89 + 90 90 + 91 91 + 92 92 + 93 93 + 94 94 + 95 95 + 96 96 + 97 97 + 98 98 + 99 99 + 100 100 + 101 101 + 102 102 + 103 103 + 104 104 + 105 105 + 106 106 + 107 107 + 108 108 + 109 109 + 110 110 + 111 111 + 112 112 + + + + + diff --git a/tests/fixtures/pr/mpr1.log.expected b/tests/fixtures/pr/mpr1.log.expected new file mode 100644 index 000000000..64d786d90 --- /dev/null +++ b/tests/fixtures/pr/mpr1.log.expected @@ -0,0 +1,198 @@ + + +{last_modified_time} Page 2 + + + 57 57 + 58 58 + 59 59 + 60 60 + 61 61 + 62 62 + 63 63 + 64 64 + 65 65 + 66 66 + 67 67 + 68 68 + 69 69 + 70 70 + 71 71 + 72 72 + 73 73 + 74 74 + 75 75 + 76 76 + 77 77 + 78 78 + 79 79 + 80 80 + 81 81 + 82 82 + 83 83 + 84 84 + 85 85 + 86 86 + 87 87 + 88 88 + 89 89 + 90 90 + 91 91 + 92 92 + 93 93 + 94 94 + 95 95 + 96 96 + 97 97 + 98 98 + 99 99 + 100 100 + 101 101 + 102 102 + 103 103 + 104 104 + 105 105 + 106 106 + 107 107 + 108 108 + 109 109 + 110 110 + 111 111 + 112 112 + + + + + + + +{last_modified_time} Page 3 + + + 113 113 + 114 114 + 115 115 + 116 116 + 117 117 + 118 118 + 119 119 + 120 120 + 121 121 + 122 122 + 123 123 + 124 124 + 125 125 + 126 126 + 127 127 + 128 128 + 129 129 + 130 130 + 131 131 + 132 132 + 133 133 + 134 134 + 135 135 + 136 136 + 137 137 + 138 138 + 139 139 + 140 140 + 141 141 + 142 142 + 143 143 + 144 144 + 145 145 + 146 146 + 147 147 + 148 148 + 149 149 + 150 150 + 151 151 + 152 152 + 153 153 + 154 154 + 155 155 + 156 156 + 157 157 + 158 158 + 159 159 + 160 160 + 161 161 + 162 162 + 163 163 + 164 164 + 165 165 + 166 166 + 167 167 + 168 168 + + + + + + + +{last_modified_time} Page 4 + + + 169 169 + 170 170 + 171 171 + 172 172 + 173 173 + 174 174 + 175 175 + 176 176 + 177 177 + 178 178 + 179 179 + 180 180 + 181 181 + 182 182 + 183 183 + 184 184 + 185 185 + 186 186 + 187 187 + 188 188 + 189 189 + 190 190 + 191 191 + 192 192 + 193 193 + 194 194 + 195 195 + 196 196 + 197 197 + 198 198 + 199 199 + 200 200 + 201 201 + 202 202 + 203 203 + 204 204 + 205 205 + 206 206 + 207 207 + 208 208 + 209 209 + 210 210 + 211 211 + 212 212 + 213 213 + 214 214 + 215 215 + 216 216 + 217 217 + 218 218 + 219 219 + 220 220 + 221 221 + 222 222 + 223 223 + 224 224 + + + + + diff --git a/tests/fixtures/pr/mpr2.log.expected b/tests/fixtures/pr/mpr2.log.expected new file mode 100644 index 000000000..091f0f228 --- /dev/null +++ b/tests/fixtures/pr/mpr2.log.expected @@ -0,0 +1,200 @@ + + +{last_modified_time} Page 1 + + + 1 1 ## 1 + 2 2 # Host Database 2 + 3 3 # 3 + 4 4 # localhost is used to 4 + 5 5 # when the system is bo 5 + 6 6 ## 6 + 7 7 127.0.0.1 localhost 7 + 8 8 127.0.0.1 Techopss-MacB 8 + 9 9 127.0.0.1 tilakpr 9 + 10 10 255.255.255.255 broadca 10 + 11 11 ::1 localho 11 + 12 12 12 + 13 13 13 + 14 14 14 + 15 15 15 + 16 16 16 + 17 17 17 + 18 18 18 + 19 19 19 + 20 20 20 + 21 21 21 + 22 22 22 + 23 23 23 + 24 24 24 + 25 25 25 + 26 26 26 + 27 27 27 + 28 28 28 + 29 29 29 + 30 30 30 + 31 31 31 + 32 32 32 + 33 33 33 + 34 34 34 + 35 35 35 + 36 36 36 + 37 37 37 + 38 38 38 + 39 39 39 + 40 40 40 + 41 41 41 + 42 42 42 + 43 43 43 + 44 44 44 + 45 45 45 + 46 46 46 + 47 47 47 + 48 48 48 + 49 49 49 + 50 50 50 + 51 51 51 + 52 52 52 + 53 53 53 + 54 54 54 + 55 55 55 + 56 56 56 + 57 57 57 + 58 58 58 + 59 59 59 + 60 60 60 + 61 61 61 + 62 62 62 + 63 63 63 + 64 64 64 + 65 65 65 + 66 66 66 + 67 67 67 + 68 68 68 + 69 69 69 + 70 70 70 + 71 71 71 + 72 72 72 + 73 73 73 + 74 74 74 + 75 75 75 + 76 76 76 + 77 77 77 + 78 78 78 + 79 79 79 + 80 80 80 + 81 81 81 + 82 82 82 + 83 83 83 + 84 84 84 + 85 85 85 + 86 86 86 + 87 87 87 + 88 88 88 + 89 89 89 + 90 90 90 + + + + + + + +{last_modified_time} Page 2 + + + 91 91 91 + 92 92 92 + 93 93 93 + 94 94 94 + 95 95 95 + 96 96 96 + 97 97 97 + 98 98 98 + 99 99 99 + 100 100 100 + 101 101 101 + 102 102 102 + 103 103 103 + 104 104 104 + 105 105 105 + 106 106 106 + 107 107 107 + 108 108 108 + 109 109 109 + 110 110 110 + 111 111 111 + 112 112 112 + 113 113 113 + 114 114 114 + 115 115 115 + 116 116 116 + 117 117 117 + 118 118 118 + 119 119 119 + 120 120 120 + 121 121 121 + 122 122 122 + 123 123 123 + 124 124 124 + 125 125 125 + 126 126 126 + 127 127 127 + 128 128 128 + 129 129 129 + 130 130 130 + 131 131 131 + 132 132 132 + 133 133 133 + 134 134 134 + 135 135 135 + 136 136 136 + 137 137 137 + 138 138 138 + 139 139 139 + 140 140 140 + 141 141 141 + 142 142 142 + 143 143 143 + 144 144 144 + 145 145 145 + 146 146 146 + 147 147 147 + 148 148 148 + 149 149 149 + 150 150 150 + 151 151 151 + 152 152 152 + 153 153 153 + 154 154 154 + 155 155 155 + 156 156 156 + 157 157 157 + 158 158 158 + 159 159 159 + 160 160 160 + 161 161 161 + 162 162 162 + 163 163 163 + 164 164 164 + 165 165 165 + 166 166 166 + 167 167 167 + 168 168 168 + 169 169 169 + 170 170 170 + 171 171 171 + 172 172 172 + 173 173 173 + 174 174 174 + 175 175 175 + 176 176 176 + 177 177 177 + 178 178 178 + 179 179 179 + 180 180 180 + + + + + diff --git a/tests/fixtures/pr/stdin.log b/tests/fixtures/pr/stdin.log new file mode 100644 index 000000000..72c7f4604 --- /dev/null +++ b/tests/fixtures/pr/stdin.log @@ -0,0 +1,82 @@ +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed +Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: APPLE80211_M_ROAM_END (en0) +Mon Dec 10 11:42:59.372 Info: Roaming ended on interface en0 +Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: RSN_HANDSHAKE_DONE (en0) +Mon Dec 10 11:42:59.373 Info: -[CWXPCInterfaceContext setRoamInProgress:reason:]_block_invoke: roam status metric data: CWAWDMetricRoamStatus: status:0 security: 4 profile:5 origin:<34fcb9>(-69) target:<6cf37f>(-56) latency:6.083439s +Mon Dec 10 11:42:59.373 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90046 +Mon Dec 10 11:42:59.373 Info: RESUME AWDL for interface en0, reason=Roam token=2685 +Mon Dec 10 11:42:59.373 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=5] +Mon Dec 10 11:42:59.374 Info: -[CWXPCInterfaceContext __setAWDLOperatingMode:interface:error:]: attempting to set AWDL mode to 0 +Mon Dec 10 11:43:01.072 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP' +Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP +Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: DHCP airport_changed = 1 +Mon Dec 10 11:43:01.073 Info: -[CWXPCSubsystem internal_submitIPConfigLatencyMetric:leaseDuration:]: IPConfig Latency metric data: CWAWDMetricIPConfigLatencyData: DHCP latency: 29010 msecs, duration: 480 mins, security: 4 +Mon Dec 10 11:43:01.073 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90007 +Mon Dec 10 11:43:01.073 SC: _setDHCPMessage: dhcpInfoKey "State:/Network/Interface/en0/AirPort/DHCP Message" = (null) +Mon Dec 10 11:43:10.369 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:10.369 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=162 Mbps +Mon Dec 10 11:43:10.369 Info: link quality changed +Mon Dec 10 11:43:23.376 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:23.377 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=243 Mbps +Mon Dec 10 11:43:23.377 Info: link quality changed +Mon Dec 10 11:43:28.380 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:28.380 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 11:43:28.380 Info: link quality changed +Mon Dec 10 11:43:31.744 AutoJoin: BACKGROUND SCAN request on interface en0 with SSID list (null) diff --git a/tests/fixtures/pr/stdin.log.expected b/tests/fixtures/pr/stdin.log.expected new file mode 100644 index 000000000..6922ee594 --- /dev/null +++ b/tests/fixtures/pr/stdin.log.expected @@ -0,0 +1,132 @@ + + +{last_modified_time} Page 1 + + + 1 ntation processAirPortStateChanges]: pppConnectionState 0 + 2 Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 3 Mon Dec 10 11:42:56.705 Info: 802.1X changed + 4 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 5 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 6 Mon Dec 10 11:42:56.854 Info: 802.1X changed + 7 Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 8 Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 9 Mon Dec 10 11:42:57.002 Info: 802.1X changed + 10 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 11 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 12 Mon Dec 10 11:42:57.152 Info: 802.1X changed + 13 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 14 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 15 Mon Dec 10 11:42:57.302 Info: 802.1X changed + 16 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 17 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 18 Mon Dec 10 11:42:57.449 Info: 802.1X changed + 19 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 20 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 21 Mon Dec 10 11:42:57.600 Info: 802.1X changed + 22 Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 23 Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 24 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 25 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 26 Mon Dec 10 11:42:57.749 Info: 802.1X changed + 27 Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 28 Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 29 Mon Dec 10 11:42:57.896 Info: 802.1X changed + 30 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 31 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 32 Mon Dec 10 11:42:58.045 Info: 802.1X changed + 33 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 34 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 35 Mon Dec 10 11:42:58.193 Info: 802.1X changed + 36 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 37 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 38 Mon Dec 10 11:42:58.342 Info: 802.1X changed + 39 Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 40 Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 41 Mon Dec 10 11:42:58.491 Info: 802.1X changed + 42 Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 43 Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 44 Mon Dec 10 11:42:58.640 Info: 802.1X changed + 45 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 46 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 47 Mon Dec 10 11:42:58.805 Info: 802.1X changed + 48 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 49 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 50 Mon Dec 10 11:42:58.958 Info: 802.1X changed + 51 Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 52 Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 53 Mon Dec 10 11:42:59.155 Info: 802.1X changed + 54 Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 55 Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 56 Mon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + + + +{last_modified_time} Page 2 + + + 57 Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 58 Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 59 Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: APPLE80211_M_ROAM_END (en0) + 60 Mon Dec 10 11:42:59.372 Info: Roaming ended on interface en0 + 61 Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: RSN_HANDSHAKE_DONE (en0) + 62 Mon Dec 10 11:42:59.373 Info: -[CWXPCInterfaceContext setRoamInProgress:reason:]_block_invoke: roam status metric data: CWAWDMetricRoamStatus: status:0 security: 4 profile:5 origin:<34fcb9>(-69) target:<6cf37f>(-56) latency:6.083439s + 63 Mon Dec 10 11:42:59.373 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90046 + 64 Mon Dec 10 11:42:59.373 Info: RESUME AWDL for interface en0, reason=Roam token=2685 + 65 Mon Dec 10 11:42:59.373 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=5] + 66 Mon Dec 10 11:42:59.374 Info: -[CWXPCInterfaceContext __setAWDLOperatingMode:interface:error:]: attempting to set AWDL mode to 0 + 67 Mon Dec 10 11:43:01.072 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP' + 68 Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP + 69 Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: DHCP airport_changed = 1 + 70 Mon Dec 10 11:43:01.073 Info: -[CWXPCSubsystem internal_submitIPConfigLatencyMetric:leaseDuration:]: IPConfig Latency metric data: CWAWDMetricIPConfigLatencyData: DHCP latency: 29010 msecs, duration: 480 mins, security: 4 + 71 Mon Dec 10 11:43:01.073 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90007 + 72 Mon Dec 10 11:43:01.073 SC: _setDHCPMessage: dhcpInfoKey "State:/Network/Interface/en0/AirPort/DHCP Message" = (null) + 73 Mon Dec 10 11:43:10.369 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) + 74 Mon Dec 10 11:43:10.369 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=162 Mbps + 75 Mon Dec 10 11:43:10.369 Info: link quality changed + 76 Mon Dec 10 11:43:23.376 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) + 77 Mon Dec 10 11:43:23.377 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=243 Mbps + 78 Mon Dec 10 11:43:23.377 Info: link quality changed + 79 Mon Dec 10 11:43:28.380 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) + 80 Mon Dec 10 11:43:28.380 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps + 81 Mon Dec 10 11:43:28.380 Info: link quality changed + 82 Mon Dec 10 11:43:31.744 AutoJoin: BACKGROUND SCAN request on interface en0 with SSID list (null) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/fixtures/pr/tFFt-ll b/tests/fixtures/pr/tFFt-ll new file mode 100644 index 000000000..39eca655f --- /dev/null +++ b/tests/fixtures/pr/tFFt-ll @@ -0,0 +1,56 @@ +1<<< -Test: FF's in Text >>> +2<<< -b -3 / -a -3 / ... >>> +3<<< >>> +4<<< 123456789 123456789 123456789 123456789 123456789 123456789 123456789 >>> + +6<<< -Arangements: One Empty Page >>> +7<<< \f\f\n; text\f\n\ftext; \f\ftext; >>> +8<<< f\f\n; \f\n\f\n; >>> +9<<< >>> +10<<< >>> +1<<< >>> +2<<< >>> +3<<< truncation before FF; r_r_o_l-test: >>> +14<<< 123456789 123456789 123456789 >>> 15<<< xyzxyzxyz XYZXYZXYZ abcabcab >>> +16<<< 123456789 xyzxyzxyz XYZXYZXYZ >>> +7<<< >>> +8<<< >>> +9<<< >>> +20<<< >>> +1<<< >>> + + +4<<< >>> +5<<< >>> +6<<< >>> +27<<< truncation before FF; (r_l-test): >>> +28<<< trunc 29<<>> +30<<< 123456789 xyzxyzxyz XYZXYZXYZ >>> +1<<< >>> +2<<< abcdefghi >>> +3<<< >>> +4<<< >>> +5<<< >>> +6<<< >>> +7<<< >>> +8<<< >>> +9<<< abcdefghi >>> +40<<< 123456789 >>> +41<<< XYZXYZXYZ abcabcab >>> +42<<< 123456789 abcdefghi ABCDEDFHI >>> 43<<< xyzxyzxyz XYZXYZXYZ abcabcab >>> +44<<< 123456789 xyzxyzxyz XYZXYZXYZ >>> +5<<< >>> +6<<< >>> +7<<< >>> +8<<< >>> +9<<< >>> +50<<< >>> +1<<< >>> +2<<< >>> +3<<< >>> +4<<< >>> +55<<< XYZXYZXYZ abcabcab >>> +56<<< 123456789 abcdefghi ABCDEDFHI >>> 57<<< xyzxyzxyz XYZXYZXYZ abcabcab >>> +58<<< 123456789 xyzxyzxyz XYZXYZXYZ >>> +9<<< >>> +60<<< 123456789 >>> diff --git a/tests/fixtures/pr/test.log b/tests/fixtures/pr/test.log new file mode 100644 index 000000000..53aaa0151 --- /dev/null +++ b/tests/fixtures/pr/test.log @@ -0,0 +1,1000 @@ +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed +Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.354 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: APPLE80211_M_ROAM_END (en0) +Mon Dec 10 11:42:59.372 Info: Roaming ended on interface en0 +Mon Dec 10 11:42:59.372 Driver Event: _bsd_80211_event_callback: RSN_HANDSHAKE_DONE (en0) +Mon Dec 10 11:42:59.373 Info: -[CWXPCInterfaceContext setRoamInProgress:reason:]_block_invoke: roam status metric data: CWAWDMetricRoamStatus: status:0 security: 4 profile:5 origin:<34fcb9>(-69) target:<6cf37f>(-56) latency:6.083439s +Mon Dec 10 11:42:59.373 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90046 +Mon Dec 10 11:42:59.373 Info: RESUME AWDL for interface en0, reason=Roam token=2685 +Mon Dec 10 11:42:59.373 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=5] +Mon Dec 10 11:42:59.374 Info: -[CWXPCInterfaceContext __setAWDLOperatingMode:interface:error:]: attempting to set AWDL mode to 0 +Mon Dec 10 11:43:01.072 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP' +Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: State:/Network/Service/18E14EA7-4641-4104-B315-A9315814912A/DHCP +Mon Dec 10 11:43:01.072 SC: _processDHCPChanges: DHCP airport_changed = 1 +Mon Dec 10 11:43:01.073 Info: -[CWXPCSubsystem internal_submitIPConfigLatencyMetric:leaseDuration:]: IPConfig Latency metric data: CWAWDMetricIPConfigLatencyData: DHCP latency: 29010 msecs, duration: 480 mins, security: 4 +Mon Dec 10 11:43:01.073 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90007 +Mon Dec 10 11:43:01.073 SC: _setDHCPMessage: dhcpInfoKey "State:/Network/Interface/en0/AirPort/DHCP Message" = (null) +Mon Dec 10 11:43:10.369 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:10.369 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=162 Mbps +Mon Dec 10 11:43:10.369 Info: link quality changed +Mon Dec 10 11:43:23.376 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:23.377 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=243 Mbps +Mon Dec 10 11:43:23.377 Info: link quality changed +Mon Dec 10 11:43:28.380 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:28.380 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 11:43:28.380 Info: link quality changed +Mon Dec 10 11:43:31.744 AutoJoin: BACKGROUND SCAN request on interface en0 with SSID list (null) +Mon Dec 10 11:43:31.747 Scan: Cache-assisted scan request on channel 1 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 2 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 3 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.748 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.748 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.748 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.748 [channelNumber=3(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.748 )} took 0.0025 seconds, returned 10 results +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 4 does not require a live scan +Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 5 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 6 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.749 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.749 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.749 )} took 0.0008 seconds, returned 7 results +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 7 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 8 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 9 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.749 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.749 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.749 [channelNumber=9(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.749 )} took 0.0002 seconds, returned 1 results +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 10 does not require a live scan +Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 11 does not require a live scan +Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 12 does not require a live scan +Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.750 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.750 [channelNumber=10(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.750 [channelNumber=11(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.750 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.750 )} took 0.0004 seconds, returned 4 results +Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 13 does not require a live scan +Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 36 does not require a live scan +Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 40 does not require a live scan +Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.751 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.751 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.751 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 11:43:31.751 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 11:43:31.751 )} took 0.0009 seconds, returned 9 results +Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request on channel 44 does not require a live scan +Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request on channel 48 does not require a live scan +Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request on channel 149 does not require a live scan +Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.752 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.752 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 11:43:31.752 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 11:43:31.752 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:43:31.752 )} took 0.0010 seconds, returned 9 results +Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request on channel 153 does not require a live scan +Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request on channel 157 does not require a live scan +Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request on channel 161 does not require a live scan +Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.753 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.753 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 11:43:31.753 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.753 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 11:43:31.753 )} took 0.0007 seconds, returned 9 results +Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 165 does not require a live scan +Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 52 does not require a live scan +Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 56 does not require a live scan +Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.753 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.753 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:43:31.753 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 11:43:31.753 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 11:43:31.753 )} took 0.0005 seconds, returned 6 results +Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 60 does not require a live scan +Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 64 does not require a live scan +Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 11:43:31.753 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 11:43:31.754 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 11:43:31.754 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 11:43:31.754 )} took 0.0003 seconds, returned 4 results +Mon Dec 10 11:43:42.382 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 11:43:42.382 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=270 Mbps +Mon Dec 10 11:43:42.383 Info: link quality changed +Mon Dec 10 11:49:12.347 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 11:49:12.350 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 11:52:32.194 Info: SCAN request received from pid 92 (locationd) with priority 2 +Mon Dec 10 11:52:32.448 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 11:52:32.450 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 11:52:32.451 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 11:52:32.451 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.451 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.451 [channelNumber=3(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.451 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.451 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.451 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:52:32.451 )} took 0.2566 seconds, returned 10 results +Mon Dec 10 11:52:32.451 Info: scan cache updated +Mon Dec 10 11:52:32.712 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 11:52:32.715 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 11:52:32.715 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 11:52:32.715 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.715 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.715 [channelNumber=9(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.715 [channelNumber=10(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.715 [channelNumber=11(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.715 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:52:32.715 )} took 0.2636 seconds, returned 10 results +Mon Dec 10 11:52:32.994 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 11:52:32.997 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 11:52:32.998 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 11:52:32.998 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:32.998 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 11:52:32.998 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 11:52:32.998 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 11:52:32.998 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 11:52:32.998 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 11:52:32.998 )} took 0.2822 seconds, returned 14 results +Mon Dec 10 11:52:33.405 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 11:52:33.408 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 11:52:33.409 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 11:52:33.409 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 11:52:33.409 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:33.409 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 11:52:33.409 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 11:52:33.409 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 11:52:33.409 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 11:52:33.409 )} took 0.4099 seconds, returned 11 results +Mon Dec 10 11:52:33.669 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 11:52:33.672 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 11:52:33.672 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 11:52:33.672 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 11:52:33.672 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 11:52:33.672 )} took 0.2625 seconds, returned 8 results +Mon Dec 10 11:52:33.673 Info: scan cache updated +Mon Dec 10 11:52:33.693 Info: SCAN request received from pid 92 (locationd) with priority 2 +Mon Dec 10 11:52:33.693 Scan: locationd requested a live scan less than 10 seconds after previous request (1.4991s) returning cached scan results +Mon Dec 10 11:52:33.728 Info: SCAN request received from pid 92 (locationd) with priority 2 +Mon Dec 10 11:52:33.728 Scan: locationd requested a live scan less than 10 seconds after previous request (1.5339s) returning cached scan results +Mon Dec 10 11:55:47.609 Driver Discovery: _PMConnectionHandler: caps = CPU Net Disk +Mon Dec 10 11:55:47.609 Driver Discovery: _PMConnectionHandler: Being put into maintenance wake mode while fully awake. +Mon Dec 10 11:55:47.610 Info: psCallback: powerSource = AC Power +Mon Dec 10 11:55:47.610 Info: psCallback: set powersave disabled on en0 +Mon Dec 10 11:55:47.637 Info: RELINQUISH BT PAGING LOCK request received from pid 106 (bluetoothd) +Mon Dec 10 11:55:47.637 Info: RELINQUISH BT PAGING LOCK request received from pid 106 (bluetoothd) +Mon Dec 10 11:55:47.638 BTC: BT PAGING state already set to 0 +Mon Dec 10 11:55:47.638 BTC: BT PAGING state already set to 0 +Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED after 0.0 seconds +Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED after 0.0 seconds +Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED, re-enabling deferred WiFi requests +Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED, re-enabling deferred WiFi requests +Mon Dec 10 11:55:48.093 IPC: ADDED XPC CLIENT CONNECTION [loginwindow (pid=101, euid=1651299376, egid=604256670)] +Mon Dec 10 11:55:48.093 Info: START MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.093 Info: START MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:55:48.105 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) +Mon Dec 10 11:56:07.629 Driver Discovery: _PMConnectionHandler: caps = +Mon Dec 10 11:56:07.629 AutoJoin: BEST CONNECTED SCAN CANCELLED on interface en0 +Mon Dec 10 11:56:07.629 AutoJoin: BACKGROUND SCAN CANCELLED on interface en0 +Mon Dec 10 11:56:07.629 AutoJoin: Auto-join retry cancelled on interface en0 +Mon Dec 10 11:56:07.629 Offload: _tcpKeepAliveActive: TCP keep-alive is active. +Mon Dec 10 11:56:07.637 P2P: _changeInterfaceFlags: Marking p2p0 down +Mon Dec 10 11:56:07.637 Info: SleepAcknowledgementCheckForHostAP: Checking sleep readiness for HostAP +Mon Dec 10 11:56:07.637 SleepAcknowledgementCheck: Checking sleep readiness +Mon Dec 10 11:56:07.637 SleepAcknowledgementCheck: Delaying sleep acknowledgement because of VifUp +Mon Dec 10 11:56:07.638 _interfaceFlagsChanged: KEV_DL_SIFFLAGS received for p2p0 [flags=0xffff8802 (down)]. +Mon Dec 10 11:56:07.638 _interfaceFlagsChanged: Flags changed for p2p0 (0xffff8843 -> 0xffff8802) (down). +Mon Dec 10 11:56:07.638 P2P: _deviceInterfaceMarkedDown: p2p0 marked down +Mon Dec 10 11:56:07.638 P2P: _removeTimeoutForActionAndParam: Attempting to remove 'Stop GO' action (param = 0x0) +Mon Dec 10 11:56:07.638 P2P: _removeTimeoutForActionAndParam: Attempting to remove 'Scan' action (param = 0x0) +Mon Dec 10 11:56:07.638 P2P: _p2pSupervisorEventRunLoopCallback: Mark down complete for p2p0 +Mon Dec 10 11:56:07.638 SleepAcknowledgementCheck: Checking sleep readiness +Mon Dec 10 11:56:07.638 WoW: SleepAcknowledgementCheck: Checking if auto-join is in progress before sleep acknowledgement +Mon Dec 10 11:56:07.638 WoW: SleepAcknowledgementDelayForAutoJoinAttempt_block_invoke: AUTO-JOIN attempt complete for en0, re-checking sleep readiness +Mon Dec 10 11:56:07.638 SleepAcknowledgementCheck: Checking sleep readiness +Mon Dec 10 11:56:07.639 WoW: _wowEnabled: WoW is active on en0 +Mon Dec 10 11:56:07.639 WoW: wowExchangeRequiredForNode: WoW exchange not required for en0 +Mon Dec 10 11:56:07.639 _acknowledgeSleepEvent: Acknowledging sleep event +Mon Dec 10 11:56:07.639 Info: PRIORITY LOCK ADDED [client=airportd, type=4, interface=(null), priority=7] +Mon Dec 10 11:56:07.640 AutoJoin: Auto-join retry cancelled on interface en0 +Mon Dec 10 11:56:07.640 Info: -[CWXPCSubsystem resetAutoJoinDisableState]_block_invoke: Auto-join disabled state reset +Mon Dec 10 11:56:17.640 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=(null), priority=7] +Mon Dec 10 12:04:46.023 Driver Discovery: _PMConnectionHandler: caps = CPU Net Disk Early +Mon Dec 10 12:04:46.023 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:46.023 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on awdl0 +Mon Dec 10 12:04:46.023 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:46.023 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on p2p0 +Mon Dec 10 12:04:46.023 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:46.023 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on en0 +Mon Dec 10 12:04:46.023 Driver Discovery: _PMConnectionHandler: DARK WAKE with maintenance SSID, performing maintenance wake auto-join for interface en0 +Mon Dec 10 12:04:46.023 AutoJoin: AUTO-JOIN trigger requested (Maintenance Wake) +Mon Dec 10 12:04:46.026 Info: psCallback: powerSource = AC Power +Mon Dec 10 12:04:46.026 Info: psCallback: set powersave disabled on en0 +Mon Dec 10 12:04:46.331 BTC: BluetoothCoexStatusMonitoringCallback: Bluetooth Status Notification +Mon Dec 10 12:04:46.331 BTC: BluetoothCoexStatusNotificationProcess: BT: ON, Num HID Devices is <0>, Num SCO Devices is <0>, Num A2DP Devices is <0>, Bluetooth Bandwidth Utilization is <3>, LWM <5>, HWM <26> +Mon Dec 10 12:04:46.332 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:04:46.332 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:04:46.332 Info: AWDL real time mode ended +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:04:46.332 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:04:46.332 {type = mutable dict, count = 2, +Mon Dec 10 12:04:46.332 entries => +Mon Dec 10 12:04:46.332 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.332 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.332 } +Mon Dec 10 12:04:46.332 +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:04:46.332 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:04:46.333 AutoJoin: user: patidar +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:04:46.333 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:04:46.333 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:04:46.333 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:04:46.333 Info: AWDL real time mode ended +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:04:46.333 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:04:46.333 {type = mutable dict, count = 2, +Mon Dec 10 12:04:46.333 entries => +Mon Dec 10 12:04:46.333 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.333 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.333 } +Mon Dec 10 12:04:46.333 +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:04:46.333 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:04:46.334 Info: SCAN request received from pid 92 (locationd) with priority 2 +Mon Dec 10 12:04:46.334 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:04:46.334 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:04:46.334 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:04:46.334 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:04:46.334 Info: -[CWXPCSubsystem clearScanCacheWithInterfaceName:connection:error:]: Clearing scan cache for interface en0 +Mon Dec 10 12:04:46.334 Info: -[CWXPCSubsystem clearScanCacheWithInterfaceName:connection:error:]: Clearing family+driver scan cache for interface en0 +Mon Dec 10 12:04:46.334 AutoJoin: AUTO-JOIN STARTED for interface en0 (Maintenance Wake) +Mon Dec 10 12:04:46.334 Info: PRIORITY LOCK ADDED [client=airportd, type=4, interface=en0, priority=7] +Mon Dec 10 12:04:46.334 AutoJoin: NOT RECOVERY MODE => continuing +Mon Dec 10 12:04:46.334 Info: scan cache updated +Mon Dec 10 12:04:46.335 AutoJoin: NOT LOGINWINDOW MODE 802.1X => continuing +Mon Dec 10 12:04:46.335 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:04:46.335 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:04:46.335 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:04:46.335 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:04:46.335 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:04:46.336 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:04:46.336 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:04:46.336 {type = mutable dict, count = 2, +Mon Dec 10 12:04:46.336 entries => +Mon Dec 10 12:04:46.336 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.336 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.336 } +Mon Dec 10 12:04:46.336 +Mon Dec 10 12:04:46.336 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:04:46.336 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:04:46.336 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:04:46.336 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:04:46.336 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:04:46.336 Info: REQUEST DEFERRED minimum=7 [client=locationd, type=4, interface=en0, priority=5] +Mon Dec 10 12:04:46.336 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:04:46.336 P2P: _interfaceLinkChanged: Stopping IPv6 link local on awdl0 +Mon Dec 10 12:04:46.336 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:04:46.337 Info: AWDL real time mode ended +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:04:46.337 AutoJoin: Reviewing the preferred networks list +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:04:46.337 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:04:46.337 AutoJoin: Adding network ['XT1635-02 9086' (wifi.ssid.5854313633352d30322039303836) - WPA2 Personal] +Mon Dec 10 12:04:46.337 AutoJoin: Adding network ['Prawin' (wifi.ssid.50726177696e) - WPA/WPA2 Personal] +Mon Dec 10 12:04:46.337 AutoJoin: Adding network ['Tilak' (wifi.ssid.54696c616b) - WPA Personal] +Mon Dec 10 12:04:46.337 AutoJoin: Ignoring disabled network ['Redmi' (wifi.ssid.5265646d69) - Open] +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:04:46.337 {type = mutable dict, count = 2, +Mon Dec 10 12:04:46.337 entries => +Mon Dec 10 12:04:46.337 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.337 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.337 } +Mon Dec 10 12:04:46.337 +Mon Dec 10 12:04:46.337 AutoJoin: Adding network ['twdata' (wifi.ssid.747764617461) - WPA2 Enterprise] +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:04:46.337 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:04:46.337 AutoJoin: Adding network ['401UnauthorizedAccess' (wifi.ssid.343031556e617574686f72697a6564416363657373) - WPA2 Personal] +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['Ayush' (wifi.ssid.4179757368) - WPA/WPA2 Personal] +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['twguest' (wifi.ssid.74776775657374) - WPA2 Personal] +Mon Dec 10 12:04:46.338 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:04:46.338 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:04:46.338 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:04:46.338 AutoJoin: Ignoring disabled network ['Illiad' (wifi.ssid.496c6c696164) - WPA2 Personal] +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['NOSI' (wifi.ssid.4e4f5349) - WPA2 Enterprise] +Mon Dec 10 12:04:46.338 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['Network Not Found' (wifi.ssid.4e6574776f726b204e6f7420466f756e64) - WPA2 Personal] +Mon Dec 10 12:04:46.338 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['403Forbidden' (wifi.ssid.343033466f7262696464656e) - WPA2 Personal] +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['NETGEAR' (wifi.ssid.4e455447454152) - WPA2 Personal] +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['No' (wifi.ssid.4e6f) - WPA2 Personal] +Mon Dec 10 12:04:46.338 Info: AWDL real time mode ended +Mon Dec 10 12:04:46.338 AutoJoin: Adding network ['gruppopam' (wifi.ssid.67727570706f70616d) - WPA2 Personal] +Mon Dec 10 12:04:46.338 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:04:46.339 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:04:46.340 AutoJoin: NOT LINK DOWN RECOVERY => continuing +Mon Dec 10 12:04:46.340 AutoJoin: MAINTENANCE WAKE => will attempt to restore maintenance wake association +Mon Dec 10 12:04:46.340 AutoJoin: Already associated to 'NOSI' (<4e4f5349>), will not continue auto-join +Mon Dec 10 12:04:46.340 AutoJoin: AUTO-JOIN COMPLETED for interface en0, took 0.0056 seconds, returned result 'success', error [NO ERROR] +Mon Dec 10 12:04:46.340 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=7] +Mon Dec 10 12:04:46.340 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:04:46.340 Info: REQUEST UN-DEFERRED minimum=-9223372036854775808 [client=locationd, type=4, interface=en0, priority=5] +Mon Dec 10 12:04:46.340 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:04:46.340 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:04:46.340 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:04:46.341 {type = mutable dict, count = 2, +Mon Dec 10 12:04:46.341 entries => +Mon Dec 10 12:04:46.341 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.341 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:46.341 } +Mon Dec 10 12:04:46.341 +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:04:46.341 Driver Event: _bsd_80211_event_callback: POWER_CHANGED (en0) +Mon Dec 10 12:04:46.341 BTC: BluetoothCoexistenceTickle: Triggering BTC status notification +Mon Dec 10 12:04:46.341 P2P: _bsd_80211_event_callback: Marking p2p0 up because en0 was powered on +Mon Dec 10 12:04:46.341 P2P: _changeInterfaceFlags: Marking p2p0 up +Mon Dec 10 12:04:46.342 Info: -[CWXPCSubsystem performScanWithChannelList:ssidList:legacyScanSSID:dwellTimeOverride:includeHiddenNetworks:mergeScanResults:interfaceName:connection:error:]: Failed to perform Wi-Fi scan, returned error code 16, will try again in 200 ms +Mon Dec 10 12:04:46.342 P2P: AwdlNodeShouldBeMarkedUp: awdl0 should be marked up +Mon Dec 10 12:04:46.342 P2P: _bsd_80211_event_callback: Marking awdl0 up because en0 was powered on +Mon Dec 10 12:04:46.342 P2P: _interfaceLinkChanged: Starting IPv6 link local on awdl0 +Mon Dec 10 12:04:46.342 Info: power changed +Mon Dec 10 12:04:46.342 _interfaceFlagsChanged: KEV_DL_SIFFLAGS received for p2p0 [flags=0xffff8843 (up)]. +Mon Dec 10 12:04:46.342 _interfaceFlagsChanged: Flags changed for p2p0 (0xffff8802 -> 0xffff8843) (up). +Mon Dec 10 12:04:46.342 Driver Discovery: _interfaceFlagsChanged: p2p0 transitioning from down to up. +Mon Dec 10 12:04:46.342 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:04:46.342 P2P: _deviceInterfaceMarkedUp: p2p0 marked up +Mon Dec 10 12:04:46.342 P2P: _deviceInterfaceMarkedUp: on p2p0 Num Advertised[0] +Mon Dec 10 12:04:46.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:04:46.343 BTC: BluetoothCoexStatusMonitoringCallback: Bluetooth Status Notification +Mon Dec 10 12:04:46.343 BTC: BluetoothCoexStatusNotificationProcess: BT: ON, Num HID Devices is <0>, Num SCO Devices is <0>, Num A2DP Devices is <0>, Bluetooth Bandwidth Utilization is <3>, LWM <5>, HWM <26> +Mon Dec 10 12:04:46.344 AutoJoin: BACKGROUND SCAN SCHEDULED on interface en0 in 60.0s with SSID list (null), remaining SSID list (null) +Mon Dec 10 12:04:46.501 P2P: _interfaceLinkChanged: Starting IPv6 link local on awdl0 +Mon Dec 10 12:04:46.501 Driver Event: _bsd_80211_event_callback: CHANNEL_SWITCH (en0) +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/ProfileID' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEP40' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID_STR' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AirPlay' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AutoJoinTimestamp' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BSSID' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CHANNEL' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Busy' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Power Status' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEPOPENSYSTEM' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CachedScanRecord' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/UserMode8021X' +Mon Dec 10 12:04:46.509 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BusyUI' +Mon Dec 10 12:04:47.037 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:04:47.041 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:04:47.041 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:04:47.041 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.041 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.041 [channelNumber=3(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.041 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.041 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.041 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:04:47.041 )} took 0.7073 seconds, returned 11 results +Mon Dec 10 12:04:47.041 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:04:47.041 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:04:47.041 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:04:47.041 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:04:47.042 {type = mutable dict, count = 2, +Mon Dec 10 12:04:47.042 entries => +Mon Dec 10 12:04:47.042 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:47.042 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:04:47.042 } +Mon Dec 10 12:04:47.042 +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:04:47.042 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:04:47.288 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:04:47.290 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:04:47.290 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.290 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.290 [channelNumber=9(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.290 [channelNumber=10(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.290 [channelNumber=11(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.290 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:04:47.290 )} took 0.2476 seconds, returned 3 results +Mon Dec 10 12:04:47.291 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:04:47.559 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:04:47.562 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:04:47.562 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:04:47.562 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:47.562 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:04:47.562 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:04:47.562 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:04:47.562 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:04:47.562 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:04:47.562 )} took 0.2715 seconds, returned 11 results +Mon Dec 10 12:04:47.563 Info: scan cache updated +Mon Dec 10 12:04:47.807 Driver Discovery: _PMConnectionHandler: caps = CPU Net Disk +Mon Dec 10 12:04:47.808 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:47.808 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on awdl0 +Mon Dec 10 12:04:47.808 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:47.808 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on p2p0 +Mon Dec 10 12:04:47.809 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:47.809 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on en0 +Mon Dec 10 12:04:47.809 Driver Discovery: _PMConnectionHandler: DARK WAKE with maintenance SSID, performing maintenance wake auto-join for interface en0 +Mon Dec 10 12:04:47.811 AutoJoin: AUTO-JOIN trigger requested (Maintenance Wake) +Mon Dec 10 12:04:47.811 Info: psCallback: powerSource = AC Power +Mon Dec 10 12:04:47.811 Info: psCallback: set powersave disabled on en0 +Mon Dec 10 12:04:47.815 IPC: INVALIDATED XPC CLIENT CONNECTION [loginwindow (pid=101, euid=1651299376, egid=604256670)] +Mon Dec 10 12:04:47.815 WoW: WoW not supported on awdl0, skipping +Mon Dec 10 12:04:47.815 WoW: WoW not supported on p2p0, skipping +Mon Dec 10 12:04:47.815 AutoJoin: user: patidar +Mon Dec 10 12:04:47.816 Info: -[CWXPCSubsystem clearScanCacheWithInterfaceName:connection:error:]: Clearing scan cache for interface en0 +Mon Dec 10 12:04:47.816 Info: -[CWXPCSubsystem clearScanCacheWithInterfaceName:connection:error:]: Clearing family+driver scan cache for interface en0 +Mon Dec 10 12:04:47.816 Info: PRIORITY LOCK ADDED [client=airportd, type=4, interface=en0, priority=7] +Mon Dec 10 12:04:47.816 AutoJoin: AUTO-JOIN STARTED for interface en0 (Maintenance Wake) +Mon Dec 10 12:04:47.816 AutoJoin: NOT RECOVERY MODE => continuing +Mon Dec 10 12:04:47.818 AutoJoin: NOT LOGINWINDOW MODE 802.1X => continuing +Mon Dec 10 12:04:47.821 AutoJoin: Reviewing the preferred networks list +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['XT1635-02 9086' (wifi.ssid.5854313633352d30322039303836) - WPA2 Personal] +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['Prawin' (wifi.ssid.50726177696e) - WPA/WPA2 Personal] +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['Tilak' (wifi.ssid.54696c616b) - WPA Personal] +Mon Dec 10 12:04:47.821 AutoJoin: Ignoring disabled network ['Redmi' (wifi.ssid.5265646d69) - Open] +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['twdata' (wifi.ssid.747764617461) - WPA2 Enterprise] +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['401UnauthorizedAccess' (wifi.ssid.343031556e617574686f72697a6564416363657373) - WPA2 Personal] +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['Ayush' (wifi.ssid.4179757368) - WPA/WPA2 Personal] +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['twguest' (wifi.ssid.74776775657374) - WPA2 Personal] +Mon Dec 10 12:04:47.821 AutoJoin: Ignoring disabled network ['Illiad' (wifi.ssid.496c6c696164) - WPA2 Personal] +Mon Dec 10 12:04:47.821 AutoJoin: Adding network ['NOSI' (wifi.ssid.4e4f5349) - WPA2 Enterprise] +Mon Dec 10 12:04:47.822 AutoJoin: Adding network ['Network Not Found' (wifi.ssid.4e6574776f726b204e6f7420466f756e64) - WPA2 Personal] +Mon Dec 10 12:04:47.822 AutoJoin: Adding network ['403Forbidden' (wifi.ssid.343033466f7262696464656e) - WPA2 Personal] +Mon Dec 10 12:04:47.822 AutoJoin: Adding network ['NETGEAR' (wifi.ssid.4e455447454152) - WPA2 Personal] +Mon Dec 10 12:04:47.822 AutoJoin: Adding network ['No' (wifi.ssid.4e6f) - WPA2 Personal] +Mon Dec 10 12:04:47.822 AutoJoin: Adding network ['gruppopam' (wifi.ssid.67727570706f70616d) - WPA2 Personal] +Mon Dec 10 12:04:47.823 AutoJoin: NOT LINK DOWN RECOVERY => continuing +Mon Dec 10 12:04:47.823 AutoJoin: MAINTENANCE WAKE => will attempt to restore maintenance wake association +Mon Dec 10 12:04:47.823 AutoJoin: Already associated to 'NOSI' (<4e4f5349>), will not continue auto-join +Mon Dec 10 12:04:47.823 AutoJoin: AUTO-JOIN COMPLETED for interface en0, took 0.0074 seconds, returned result 'success', error [NO ERROR] +Mon Dec 10 12:04:47.823 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=7] +Mon Dec 10 12:04:48.030 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:04:48.031 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:04:48.032 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:04:48.032 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:04:48.032 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:48.032 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:04:48.032 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:04:48.032 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:04:48.032 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:04:48.032 )} took 0.4685 seconds, returned 8 results +Mon Dec 10 12:04:48.177 Driver Discovery: _PMConnectionHandler: caps = CPU Video Audio Net Disk +Mon Dec 10 12:04:48.177 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:48.177 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on awdl0 +Mon Dec 10 12:04:48.178 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:48.178 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on p2p0 +Mon Dec 10 12:04:48.178 Info: _systemWokenByWiFi: System wake reason: , was not woken by WiFi +Mon Dec 10 12:04:48.178 Info: _updateWakeLimitCounters: TCP keep alive timed out 0 times on en0 +Mon Dec 10 12:04:48.178 AutoJoin: -[CWXPCInterfaceContext clearAllProblematicNetworks]_block_invoke: Unblacklisting all networks. +Mon Dec 10 12:04:48.178 AutoJoin: -[CWXPCInterfaceContext clearAllNetworksBlacklistedForScanOffload]_block_invoke: Clearing all networks blacklisted for scan offload. +Mon Dec 10 12:04:48.178 Offload: _tcpKeepAliveActive: TCP keep-alive is active. +Mon Dec 10 12:04:48.178 AutoJoin: airportdProcessFullWake: Received full wake event for en0 +Mon Dec 10 12:04:48.178 AutoJoin: airportdProcessFullWake: Invoking auto-join for full wake event for en0 +Mon Dec 10 12:04:48.178 Info: __enableTemporarilyDisabledNetworks: Attempting to re-enable any temporarily-disabled network profiles +Mon Dec 10 12:04:48.178 Info: psCallback: powerSource = AC Power +Mon Dec 10 12:04:48.178 Info: psCallback: set powersave disabled on en0 +Mon Dec 10 12:04:48.180 AutoJoin: AUTO-JOIN trigger requested (Full Wake) +Mon Dec 10 12:04:48.180 AutoJoin: BEST CONNECTED SCAN SCHEDULED on interface en0 in 20.0s for network 'NOSI' +Mon Dec 10 12:04:48.181 AutoJoin: user: patidar +Mon Dec 10 12:04:48.182 AutoJoin: BACKGROUND SCAN SCHEDULED on interface en0 in 60.0s with SSID list (null), remaining SSID list (null) +Mon Dec 10 12:04:48.182 Info: -[CWXPCSubsystem clearScanCacheWithInterfaceName:connection:error:]: Clearing scan cache for interface en0 +Mon Dec 10 12:04:48.182 Info: -[CWXPCSubsystem clearScanCacheWithInterfaceName:connection:error:]: Clearing family+driver scan cache for interface en0 +Mon Dec 10 12:04:48.182 Info: PRIORITY LOCK ADDED [client=airportd, type=4, interface=en0, priority=7] +Mon Dec 10 12:04:48.182 AutoJoin: AUTO-JOIN STARTED for interface en0 (Full Wake) +Mon Dec 10 12:04:48.182 AutoJoin: NOT RECOVERY MODE => continuing +Mon Dec 10 12:04:48.183 AutoJoin: NOT LOGINWINDOW MODE 802.1X => continuing +Mon Dec 10 12:04:48.185 AutoJoin: Reviewing the preferred networks list +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['XT1635-02 9086' (wifi.ssid.5854313633352d30322039303836) - WPA2 Personal] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['Prawin' (wifi.ssid.50726177696e) - WPA/WPA2 Personal] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['Tilak' (wifi.ssid.54696c616b) - WPA Personal] +Mon Dec 10 12:04:48.185 AutoJoin: Ignoring disabled network ['Redmi' (wifi.ssid.5265646d69) - Open] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['twdata' (wifi.ssid.747764617461) - WPA2 Enterprise] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['401UnauthorizedAccess' (wifi.ssid.343031556e617574686f72697a6564416363657373) - WPA2 Personal] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['Ayush' (wifi.ssid.4179757368) - WPA/WPA2 Personal] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['twguest' (wifi.ssid.74776775657374) - WPA2 Personal] +Mon Dec 10 12:04:48.185 AutoJoin: Ignoring disabled network ['Illiad' (wifi.ssid.496c6c696164) - WPA2 Personal] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['NOSI' (wifi.ssid.4e4f5349) - WPA2 Enterprise] +Mon Dec 10 12:04:48.185 AutoJoin: Adding network ['Network Not Found' (wifi.ssid.4e6574776f726b204e6f7420466f756e64) - WPA2 Personal] +Mon Dec 10 12:04:48.186 AutoJoin: Adding network ['403Forbidden' (wifi.ssid.343033466f7262696464656e) - WPA2 Personal] +Mon Dec 10 12:04:48.186 AutoJoin: Adding network ['NETGEAR' (wifi.ssid.4e455447454152) - WPA2 Personal] +Mon Dec 10 12:04:48.186 AutoJoin: Adding network ['No' (wifi.ssid.4e6f) - WPA2 Personal] +Mon Dec 10 12:04:48.186 AutoJoin: Adding network ['gruppopam' (wifi.ssid.67727570706f70616d) - WPA2 Personal] +Mon Dec 10 12:04:48.187 AutoJoin: NOT LINK DOWN RECOVERY => continuing +Mon Dec 10 12:04:48.187 AutoJoin: NOT MAINTENANCE WAKE => continuing +Mon Dec 10 12:04:48.189 AutoJoin: No known colocated network for preferred network wifi.ssid.4e4f5349 +Mon Dec 10 12:04:48.189 AutoJoin: NOT MORE-PREFERRED USER MODE 802.1X NETWORKS => continuing +Mon Dec 10 12:04:48.189 AutoJoin: NOT SYSTEM MODE 802.1X => continuing +Mon Dec 10 12:04:48.189 AutoJoin: NOT WOW => continuing +Mon Dec 10 12:04:48.189 AutoJoin: NOT Power On / Reinit => continuing +Mon Dec 10 12:04:48.189 AutoJoin: NOT PNL Changed => continuing +Mon Dec 10 12:04:48.189 AutoJoin: AUTOJOIN => auto-join using the entire preferred networks list +Mon Dec 10 12:04:48.189 AutoJoin: Already associated to 'NOSI' (<4e4f5349>), will not continue auto-join +Mon Dec 10 12:04:48.189 AutoJoin: AUTO-JOIN COMPLETED for interface en0, took 0.0069 seconds, returned result 'success', error [NO ERROR] +Mon Dec 10 12:04:48.189 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=7] +Mon Dec 10 12:04:48.216 Info: machine wake +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.216 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.217 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.217 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.217 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.217 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.218 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.218 Info: START MONITORING EVENT request received from pid 383 (WiFiProxy) +Mon Dec 10 12:04:48.225 Info: -[AirPortExtraImplementation initBackend]_block_invoke: _isBusy 0 +Mon Dec 10 12:04:48.226 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:04:48.227 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:04:48.344 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:04:48.344 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:04:48.344 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:04:48.344 )} took 0.3106 seconds, returned 8 results +Mon Dec 10 12:04:48.344 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:04:48.345 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:04:48.957 Info: SCAN request received from pid 92 (locationd) with priority 2 +Mon Dec 10 12:04:48.957 Scan: locationd requested a live scan less than 10 seconds after previous request (2.6229s) returning cached scan results +Mon Dec 10 12:04:48.969 Info: SCAN request received from pid 92 (locationd) with priority 2 +Mon Dec 10 12:04:48.969 Scan: locationd requested a live scan less than 10 seconds after previous request (2.6358s) returning cached scan results +Mon Dec 10 12:04:49.319 Info: ACQUIRE BT PAGING LOCK request received from pid 106 (bluetoothd) +Mon Dec 10 12:04:49.320 Info: BT PAGING LOCK GRANTED immediately, auto-join has had a chance to run since wake +Mon Dec 10 12:04:49.320 Info: BT PAGING LOCK GRANTED after 0.0 seconds +Mon Dec 10 12:04:49.321 Info: RELINQUISH BT PAGING LOCK request received from pid 106 (bluetoothd) +Mon Dec 10 12:04:49.321 Info: BT PAGING LOCK RELINQUISHED after 0.0 seconds +Mon Dec 10 12:04:49.321 Info: BT PAGING LOCK RELINQUISHED, re-enabling deferred WiFi requests +Mon Dec 10 12:05:06.345 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:06.345 Info: _bsd_80211_event_callback: link quality: RSSI=-56 dBm TxRate=162 Mbps +Mon Dec 10 12:05:06.345 Info: link quality changed +Mon Dec 10 12:05:08.180 AutoJoin: BEST CONNECTED SCAN request on interface en0 for network 'XT1635-02 9086' +Mon Dec 10 12:05:08.281 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:08.284 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:08.284 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.284 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.284 [channelNumber=3(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:08.284 )} took 0.1034 seconds, returned 7 results +Mon Dec 10 12:05:08.284 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:08.284 Info: scan cache updated +Mon Dec 10 12:05:08.383 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:08.386 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:08.386 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.386 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.386 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:08.386 )} took 0.1023 seconds, returned 7 results +Mon Dec 10 12:05:08.386 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:08.486 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:08.488 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:08.488 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.488 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.488 [channelNumber=9(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:08.488 )} took 0.1016 seconds, returned 1 results +Mon Dec 10 12:05:08.488 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:08.589 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:08.592 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:08.592 [channelNumber=10(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.592 [channelNumber=11(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.592 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:08.592 )} took 0.1036 seconds, returned 4 results +Mon Dec 10 12:05:08.592 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:08.719 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:08.722 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:08.722 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.722 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:08.722 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:08.722 )} took 0.1298 seconds, returned 5 results +Mon Dec 10 12:05:08.722 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:08.826 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:08.828 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:08.828 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:08.828 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:08.828 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:08.828 )} took 0.1067 seconds, returned 4 results +Mon Dec 10 12:05:08.829 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:08.929 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:08.932 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:08.932 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:08.932 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:08.932 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:08.932 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:08.932 )} took 0.1035 seconds, returned 7 results +Mon Dec 10 12:05:09.215 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:09.217 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:09.217 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:09.217 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:09.217 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:09.217 )} took 0.2851 seconds, returned 5 results +Mon Dec 10 12:05:09.217 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:09.482 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:09.485 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:09.485 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:09.485 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:09.485 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:09.485 )} took 0.2679 seconds, returned 8 results +Mon Dec 10 12:05:09.486 Info: scan cache updated +Mon Dec 10 12:05:09.487 Roam: ROAMING PROFILES already set to AC POWER for 2.4GHz on en0 +Mon Dec 10 12:05:09.487 Roam: ROAMING PROFILES already set to AC POWER for 5GHz on en0 +Mon Dec 10 12:05:09.487 AutoJoin: BEST CONNECTED ROAM triggered +Mon Dec 10 12:05:09.488 Driver Event: _bsd_80211_event_callback: APPLE80211_M_ROAM_START (en0) +Mon Dec 10 12:05:09.488 Info: Roaming started on interface en0 +Mon Dec 10 12:05:09.488 Info: PRIORITY LOCK ADDED [client=airportd, type=4, interface=en0, priority=5] +Mon Dec 10 12:05:09.490 Info: -[CWXPCInterfaceContext __setAWDLOperatingMode:interface:error:]: attempting to set AWDL mode to 2 +Mon Dec 10 12:05:09.490 Info: SUSPEND AWDL for interface en0, timeout=10.0s, reason=Roam, token=2686 +Mon Dec 10 12:05:10.934 Driver Event: _bsd_80211_event_callback: APPLE80211_M_ROAM_END (en0) +Mon Dec 10 12:05:10.934 Info: Roaming ended on interface en0 +Mon Dec 10 12:05:10.935 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:05:10.935 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:05:10.935 Info: -[CWXPCInterfaceContext setRoamInProgress:reason:]_block_invoke: roam status metric data: CWAWDMetricRoamStatus: status:3 security: 4 profile:5 origin:<6cf37f>(-56) target:<6cf37f>(-57) latency:1.445767s +Mon Dec 10 12:05:10.935 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90046 +Mon Dec 10 12:05:10.935 Info: RESUME AWDL for interface en0, reason=Roam token=2686 +Mon Dec 10 12:05:10.935 Info: PRIORITY LOCK REMOVED [client=airportd, type=4, interface=en0, priority=5] +Mon Dec 10 12:05:10.936 Info: -[CWXPCInterfaceContext __setAWDLOperatingMode:interface:error:]: attempting to set AWDL mode to 0 +Mon Dec 10 12:05:11.354 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:11.354 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=243 Mbps +Mon Dec 10 12:05:11.354 Info: link quality changed +Mon Dec 10 12:05:16.355 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:16.355 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 12:05:16.356 Info: link quality changed +Mon Dec 10 12:05:21.359 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:21.359 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=300 Mbps +Mon Dec 10 12:05:21.360 Info: link quality changed +Mon Dec 10 12:05:29.363 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:29.363 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=216 Mbps +Mon Dec 10 12:05:29.364 Info: link quality changed +Mon Dec 10 12:05:38.367 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:38.367 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=243 Mbps +Mon Dec 10 12:05:38.368 Info: link quality changed +Mon Dec 10 12:05:48.180 AutoJoin: BACKGROUND SCAN request on interface en0 with SSID list (null) +Mon Dec 10 12:05:48.181 Scan: Cache-assisted scan request on channel 1 does not require a live scan +Mon Dec 10 12:05:48.181 Scan: Cache-assisted scan request on channel 2 does not require a live scan +Mon Dec 10 12:05:48.181 Scan: Cache-assisted scan request on channel 3 does not require a live scan +Mon Dec 10 12:05:48.181 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.181 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.181 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.181 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.181 [channelNumber=3(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.181 )} took 0.0006 seconds, returned 7 results +Mon Dec 10 12:05:48.181 Scan: Cache-assisted scan request on channel 4 does not require a live scan +Mon Dec 10 12:05:48.181 Scan: Cache-assisted scan request on channel 5 does not require a live scan +Mon Dec 10 12:05:48.182 Scan: Cache-assisted scan request on channel 6 does not require a live scan +Mon Dec 10 12:05:48.182 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.182 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.182 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.182 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.182 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.182 )} took 0.0006 seconds, returned 7 results +Mon Dec 10 12:05:48.182 Scan: Cache-assisted scan request on channel 7 does not require a live scan +Mon Dec 10 12:05:48.182 Scan: Cache-assisted scan request on channel 8 does not require a live scan +Mon Dec 10 12:05:48.182 Scan: Cache-assisted scan request on channel 9 does not require a live scan +Mon Dec 10 12:05:48.182 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.182 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.182 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.182 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.182 [channelNumber=9(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.182 )} took 0.0003 seconds, returned 1 results +Mon Dec 10 12:05:48.182 Scan: Cache-assisted scan request on channel 10 does not require a live scan +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 11 does not require a live scan +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 12 does not require a live scan +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.183 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.183 [channelNumber=10(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.183 [channelNumber=11(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.183 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.183 )} took 0.0007 seconds, returned 4 results +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 13 does not require a live scan +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 36 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 40 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.184 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.184 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.184 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:48.184 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:48.184 )} took 0.0007 seconds, returned 5 results +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 44 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 48 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 149 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.185 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.185 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:48.185 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:48.185 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.185 )} took 0.0006 seconds, returned 4 results +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 153 does not require a live scan +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 157 does not require a live scan +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 161 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.186 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.186 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:48.186 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.186 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:48.186 )} took 0.0010 seconds, returned 7 results +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 165 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 52 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 56 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.187 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.187 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.187 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:48.187 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:48.187 )} took 0.0008 seconds, returned 5 results +Mon Dec 10 12:05:48.187 Scan: Cache-assisted scan request on channel 60 does not require a live scan +Mon Dec 10 12:05:48.187 Scan: Cache-assisted scan request on channel 64 does not require a live scan +Mon Dec 10 12:05:48.188 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.188 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.188 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:48.188 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:48.188 )} took 0.0013 seconds, returned 8 results +Mon Dec 10 12:05:50.375 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:50.375 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=216 Mbps +Mon Dec 10 12:05:50.376 Info: link quality changed +Mon Dec 10 12:05:55.378 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:55.378 Info: _bsd_80211_event_callback: link quality: RSSI=-56 dBm TxRate=243 Mbps +Mon Dec 10 12:05:55.379 Info: link quality changed +Mon Dec 10 12:06:28.759 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:06:28.763 Info: AWDL started +Mon Dec 10 12:06:28.763 Driver Event: _bsd_80211_event_callback: CHANNEL_SWITCH (en0) +Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE-BAND, SINGLE-AP for 2.4GHz on en0 +Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE-BAND, SINGLE-AP for 5GHz on en0 +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/ProfileID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEP40' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID_STR' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AirPlay' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AutoJoinTimestamp' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BSSID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CHANNEL' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Busy' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Power Status' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEPOPENSYSTEM' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CachedScanRecord' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/UserMode8021X' +Mon Dec 10 12:06:28.771 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BusyUI' +Mon Dec 10 12:06:28.945 Info: INTERFACE STATE INFO request received from pid 362 (sharingd) +Mon Dec 10 12:06:28.946 Info: -[CWXPCInterfaceContext __copyMACAddressForInterface:]: MAC address: <82cd0ac3 bf73> +Mon Dec 10 12:06:30.064 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:30.151 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:30.151 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.137 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.138 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.832 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.832 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:48.742 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:48.742 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.121 P2P: _terminateGroupOwnerTimer: Terminate group owner timer notification received. +Mon Dec 10 12:06:49.267 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.267 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.793 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.793 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.931 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:06:50.931 Driver Event: _bsd_80211_event_callback: AWDL_STATISTICS (awdl0) +Mon Dec 10 12:06:50.932 Info: AWDL real time mode ended +Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:06:50.945 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:06:50.945 {type = mutable dict, count = 2, +Mon Dec 10 12:06:50.945 entries => +Mon Dec 10 12:06:50.945 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.945 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.945 } +Mon Dec 10 12:06:50.945 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:06:50.945 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:06:50.945 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:06:50.945 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:06:50.945 Info: AWDL real time mode ended +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:06:50.946 {type = mutable dict, count = 2, +Mon Dec 10 12:06:50.946 entries => +Mon Dec 10 12:06:50.946 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.946 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.946 } +Mon Dec 10 12:06:50.946 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:06:50.946 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:06:50.947 Info: AWDL ended +Mon Dec 10 12:06:50.951 Info: -[CWXPCInterfaceContext __submitAWDLUsageMetric:duration:]: AWDL usage metric data: CWAWDMetricAwdlUsageData: selfInfraChannel 40, peerInfraChannel 0, numOfPeers 6. Keys: Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90013 +Mon Dec 10 12:06:50.952 Info: INTERFACE STATE INFO request received from pid 362 (sharingd) +Mon Dec 10 12:06:50.952 Info: -[CWXPCInterfaceContext __copyMACAddressForInterface:]: MAC address: <82cd0ac3 bf73> +Mon Dec 10 12:06:50.953 Roam: ROAMING PROFILES updated to AC POWER for 2.4GHz on en0 +Mon Dec 10 12:06:50.953 Roam: ROAMING PROFILES updated to AC POWER for 5GHz on en0 +Mon Dec 10 12:06:53.680 Info: -[CWXPCSubsystem handleDeviceCountMetricQuery:]_block_invoke: DeviceCount metric data: CWAWDMetricDeviceCountData: timeSinceBoot: 1515466.360642, deviceCount: 1 +Mon Dec 10 12:06:53.684 Info: -[CWXPCSubsystem handleNetworkPrefsMetricQuery:]: NetworkPrefs metric data: CWAWDMetricNetworkPrefsData: preferred 15 hidden 0 open 1 wep 0 wpa 12 eap 2 +Mon Dec 10 12:06:53.684 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90004 +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90001 +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x9000d +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x9000b +Mon Dec 10 12:12:03.594 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:03.594 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=216 Mbps +Mon Dec 10 12:12:03.595 Info: link quality changed +Mon Dec 10 12:12:09.598 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:09.598 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=270 Mbps +Mon Dec 10 12:12:09.599 Info: link quality changed +Mon Dec 10 12:12:56.625 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:56.625 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 12:12:56.625 Info: link quality changed +Mon Dec 10 12:13:01.625 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:01.625 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=243 Mbps +Mon Dec 10 12:13:01.626 Info: link quality changed +Mon Dec 10 12:13:06.628 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:06.628 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 12:13:06.628 Info: link quality changed +Mon Dec 10 12:13:27.639 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:27.639 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=243 Mbps +Mon Dec 10 12:13:27.640 Info: link quality changed +Mon Dec 10 12:14:46.658 Info: SCAN request received from pid 92 (locationd) with priority 2 +Mon Dec 10 12:14:46.902 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:46.905 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:46.906 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:46.906 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=3(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:14:46.906 )} took 0.2478 seconds, returned 13 results +Mon Dec 10 12:14:46.906 Info: scan cache updated +Mon Dec 10 12:14:47.158 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:47.160 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:47.160 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=9(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=10(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=11(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:14:47.160 )} took 0.2532 seconds, returned 4 results +Mon Dec 10 12:14:47.161 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:47.433 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:47.436 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:47.437 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:47.437 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.437 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:14:47.437 )} took 0.2763 seconds, returned 11 results +Mon Dec 10 12:14:47.778 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:47.781 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:47.782 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:47.782 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.782 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.782 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.782 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.782 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:14:47.782 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:14:47.782 )} took 0.3436 seconds, returned 9 results +Mon Dec 10 12:14:48.052 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:48.055 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:48.055 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:14:48.055 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:14:48.055 )} took 0.2714 seconds, returned 6 results +Mon Dec 10 12:14:48.055 Info: QUERY SCAN CACHE request received from pid 92 (locationd) diff --git a/tests/fixtures/pr/test_num_page.log b/tests/fixtures/pr/test_num_page.log new file mode 100644 index 000000000..da467dce2 --- /dev/null +++ b/tests/fixtures/pr/test_num_page.log @@ -0,0 +1,112 @@ +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed diff --git a/tests/fixtures/pr/test_num_page_2.log.expected b/tests/fixtures/pr/test_num_page_2.log.expected new file mode 100644 index 000000000..dae437ef8 --- /dev/null +++ b/tests/fixtures/pr/test_num_page_2.log.expected @@ -0,0 +1,132 @@ + + +{last_modified_time} test_num_page.log Page 1 + + + 1 ntation processAirPortStateChanges]: pppConnectionState 0 + 2 Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 3 Mon Dec 10 11:42:56.705 Info: 802.1X changed + 4 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 5 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 6 Mon Dec 10 11:42:56.854 Info: 802.1X changed + 7 Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 8 Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 9 Mon Dec 10 11:42:57.002 Info: 802.1X changed +10 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +11 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +12 Mon Dec 10 11:42:57.152 Info: 802.1X changed +13 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +14 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +15 Mon Dec 10 11:42:57.302 Info: 802.1X changed +16 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +17 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +18 Mon Dec 10 11:42:57.449 Info: 802.1X changed +19 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +20 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +21 Mon Dec 10 11:42:57.600 Info: 802.1X changed +22 Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +23 Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +24 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +25 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +26 Mon Dec 10 11:42:57.749 Info: 802.1X changed +27 Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +28 Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +29 Mon Dec 10 11:42:57.896 Info: 802.1X changed +30 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +31 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +32 Mon Dec 10 11:42:58.045 Info: 802.1X changed +33 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +34 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +35 Mon Dec 10 11:42:58.193 Info: 802.1X changed +36 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +37 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +38 Mon Dec 10 11:42:58.342 Info: 802.1X changed +39 Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +40 Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +41 Mon Dec 10 11:42:58.491 Info: 802.1X changed +42 Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +43 Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +44 Mon Dec 10 11:42:58.640 Info: 802.1X changed +45 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +46 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +47 Mon Dec 10 11:42:58.805 Info: 802.1X changed +48 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +49 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +50 Mon Dec 10 11:42:58.958 Info: 802.1X changed +51 Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +52 Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +53 Mon Dec 10 11:42:59.155 Info: 802.1X changed +54 Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +55 Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +56 Mon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + + + +{last_modified_time} test_num_page.log Page 2 + + +57 ntation processAirPortStateChanges]: pppConnectionState 0 +58 Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +59 Mon Dec 10 11:42:56.705 Info: 802.1X changed +60 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +61 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +62 Mon Dec 10 11:42:56.854 Info: 802.1X changed +63 Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +64 Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +65 Mon Dec 10 11:42:57.002 Info: 802.1X changed +66 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +67 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +68 Mon Dec 10 11:42:57.152 Info: 802.1X changed +69 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +70 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +71 Mon Dec 10 11:42:57.302 Info: 802.1X changed +72 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +73 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +74 Mon Dec 10 11:42:57.449 Info: 802.1X changed +75 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +76 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +77 Mon Dec 10 11:42:57.600 Info: 802.1X changed +78 Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +79 Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +80 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +81 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +82 Mon Dec 10 11:42:57.749 Info: 802.1X changed +83 Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +84 Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +85 Mon Dec 10 11:42:57.896 Info: 802.1X changed +86 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +87 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +88 Mon Dec 10 11:42:58.045 Info: 802.1X changed +89 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +90 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +91 Mon Dec 10 11:42:58.193 Info: 802.1X changed +92 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +93 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +94 Mon Dec 10 11:42:58.342 Info: 802.1X changed +95 Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +96 Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +97 Mon Dec 10 11:42:58.491 Info: 802.1X changed +98 Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +99 Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +00 Mon Dec 10 11:42:58.640 Info: 802.1X changed +01 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +02 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +03 Mon Dec 10 11:42:58.805 Info: 802.1X changed +04 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +05 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +06 Mon Dec 10 11:42:58.958 Info: 802.1X changed +07 Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +08 Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +09 Mon Dec 10 11:42:59.155 Info: 802.1X changed +10 Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +11 Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +12 Mon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + diff --git a/tests/fixtures/pr/test_num_page_char.log.expected b/tests/fixtures/pr/test_num_page_char.log.expected new file mode 100644 index 000000000..169dbd844 --- /dev/null +++ b/tests/fixtures/pr/test_num_page_char.log.expected @@ -0,0 +1,132 @@ + + +{last_modified_time} test_num_page.log Page 1 + + + 1cntation processAirPortStateChanges]: pppConnectionState 0 + 2cMon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 3cMon Dec 10 11:42:56.705 Info: 802.1X changed + 4cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 5cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 6cMon Dec 10 11:42:56.854 Info: 802.1X changed + 7cMon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 8cMon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 9cMon Dec 10 11:42:57.002 Info: 802.1X changed + 10cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 11cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 12cMon Dec 10 11:42:57.152 Info: 802.1X changed + 13cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 14cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 15cMon Dec 10 11:42:57.302 Info: 802.1X changed + 16cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 17cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 18cMon Dec 10 11:42:57.449 Info: 802.1X changed + 19cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 20cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 21cMon Dec 10 11:42:57.600 Info: 802.1X changed + 22cMon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 23cMon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 24cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 25cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 26cMon Dec 10 11:42:57.749 Info: 802.1X changed + 27cMon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 28cMon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 29cMon Dec 10 11:42:57.896 Info: 802.1X changed + 30cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 31cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 32cMon Dec 10 11:42:58.045 Info: 802.1X changed + 33cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 34cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 35cMon Dec 10 11:42:58.193 Info: 802.1X changed + 36cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 37cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 38cMon Dec 10 11:42:58.342 Info: 802.1X changed + 39cMon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 40cMon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 41cMon Dec 10 11:42:58.491 Info: 802.1X changed + 42cMon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 43cMon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 44cMon Dec 10 11:42:58.640 Info: 802.1X changed + 45cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 46cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 47cMon Dec 10 11:42:58.805 Info: 802.1X changed + 48cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 49cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 50cMon Dec 10 11:42:58.958 Info: 802.1X changed + 51cMon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 52cMon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 53cMon Dec 10 11:42:59.155 Info: 802.1X changed + 54cMon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 55cMon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 56cMon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + + + +{last_modified_time} test_num_page.log Page 2 + + + 57cntation processAirPortStateChanges]: pppConnectionState 0 + 58cMon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 59cMon Dec 10 11:42:56.705 Info: 802.1X changed + 60cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 61cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 62cMon Dec 10 11:42:56.854 Info: 802.1X changed + 63cMon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 64cMon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 65cMon Dec 10 11:42:57.002 Info: 802.1X changed + 66cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 67cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 68cMon Dec 10 11:42:57.152 Info: 802.1X changed + 69cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 70cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 71cMon Dec 10 11:42:57.302 Info: 802.1X changed + 72cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 73cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 74cMon Dec 10 11:42:57.449 Info: 802.1X changed + 75cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 76cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 77cMon Dec 10 11:42:57.600 Info: 802.1X changed + 78cMon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 79cMon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 80cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 81cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 82cMon Dec 10 11:42:57.749 Info: 802.1X changed + 83cMon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 84cMon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 85cMon Dec 10 11:42:57.896 Info: 802.1X changed + 86cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 87cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 88cMon Dec 10 11:42:58.045 Info: 802.1X changed + 89cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 90cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 91cMon Dec 10 11:42:58.193 Info: 802.1X changed + 92cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 93cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 94cMon Dec 10 11:42:58.342 Info: 802.1X changed + 95cMon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 96cMon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 97cMon Dec 10 11:42:58.491 Info: 802.1X changed + 98cMon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 99cMon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 100cMon Dec 10 11:42:58.640 Info: 802.1X changed + 101cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 102cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 103cMon Dec 10 11:42:58.805 Info: 802.1X changed + 104cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 105cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 106cMon Dec 10 11:42:58.958 Info: 802.1X changed + 107cMon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 108cMon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 109cMon Dec 10 11:42:59.155 Info: 802.1X changed + 110cMon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 111cMon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 112cMon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + diff --git a/tests/fixtures/pr/test_num_page_char_one.log.expected b/tests/fixtures/pr/test_num_page_char_one.log.expected new file mode 100644 index 000000000..dd7813192 --- /dev/null +++ b/tests/fixtures/pr/test_num_page_char_one.log.expected @@ -0,0 +1,132 @@ + + +{last_modified_time} test_num_page.log Page 1 + + +1cntation processAirPortStateChanges]: pppConnectionState 0 +2cMon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +3cMon Dec 10 11:42:56.705 Info: 802.1X changed +4cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +5cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +6cMon Dec 10 11:42:56.854 Info: 802.1X changed +7cMon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +8cMon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +9cMon Dec 10 11:42:57.002 Info: 802.1X changed +0cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +1cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +2cMon Dec 10 11:42:57.152 Info: 802.1X changed +3cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +4cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +5cMon Dec 10 11:42:57.302 Info: 802.1X changed +6cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +7cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +8cMon Dec 10 11:42:57.449 Info: 802.1X changed +9cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +0cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +1cMon Dec 10 11:42:57.600 Info: 802.1X changed +2cMon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +3cMon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +4cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +5cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +6cMon Dec 10 11:42:57.749 Info: 802.1X changed +7cMon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +8cMon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +9cMon Dec 10 11:42:57.896 Info: 802.1X changed +0cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +1cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +2cMon Dec 10 11:42:58.045 Info: 802.1X changed +3cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +4cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +5cMon Dec 10 11:42:58.193 Info: 802.1X changed +6cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +7cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +8cMon Dec 10 11:42:58.342 Info: 802.1X changed +9cMon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +0cMon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +1cMon Dec 10 11:42:58.491 Info: 802.1X changed +2cMon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +3cMon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +4cMon Dec 10 11:42:58.640 Info: 802.1X changed +5cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +6cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +7cMon Dec 10 11:42:58.805 Info: 802.1X changed +8cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +9cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +0cMon Dec 10 11:42:58.958 Info: 802.1X changed +1cMon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +2cMon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +3cMon Dec 10 11:42:59.155 Info: 802.1X changed +4cMon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +5cMon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +6cMon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + + + +{last_modified_time} test_num_page.log Page 2 + + +7cntation processAirPortStateChanges]: pppConnectionState 0 +8cMon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +9cMon Dec 10 11:42:56.705 Info: 802.1X changed +0cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +1cMon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +2cMon Dec 10 11:42:56.854 Info: 802.1X changed +3cMon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +4cMon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +5cMon Dec 10 11:42:57.002 Info: 802.1X changed +6cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +7cMon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +8cMon Dec 10 11:42:57.152 Info: 802.1X changed +9cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +0cMon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +1cMon Dec 10 11:42:57.302 Info: 802.1X changed +2cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +3cMon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +4cMon Dec 10 11:42:57.449 Info: 802.1X changed +5cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +6cMon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +7cMon Dec 10 11:42:57.600 Info: 802.1X changed +8cMon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +9cMon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +0cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +1cMon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +2cMon Dec 10 11:42:57.749 Info: 802.1X changed +3cMon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +4cMon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +5cMon Dec 10 11:42:57.896 Info: 802.1X changed +6cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +7cMon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +8cMon Dec 10 11:42:58.045 Info: 802.1X changed +9cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +0cMon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +1cMon Dec 10 11:42:58.193 Info: 802.1X changed +2cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +3cMon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +4cMon Dec 10 11:42:58.342 Info: 802.1X changed +5cMon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +6cMon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +7cMon Dec 10 11:42:58.491 Info: 802.1X changed +8cMon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +9cMon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +0cMon Dec 10 11:42:58.640 Info: 802.1X changed +1cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +2cMon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +3cMon Dec 10 11:42:58.805 Info: 802.1X changed +4cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +5cMon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +6cMon Dec 10 11:42:58.958 Info: 802.1X changed +7cMon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +8cMon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +9cMon Dec 10 11:42:59.155 Info: 802.1X changed +0cMon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +1cMon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +2cMon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + diff --git a/tests/fixtures/pr/test_one_page.log b/tests/fixtures/pr/test_one_page.log new file mode 100644 index 000000000..4de6f5bf3 --- /dev/null +++ b/tests/fixtures/pr/test_one_page.log @@ -0,0 +1,56 @@ +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed diff --git a/tests/fixtures/pr/test_one_page.log.expected b/tests/fixtures/pr/test_one_page.log.expected new file mode 100644 index 000000000..54f772392 --- /dev/null +++ b/tests/fixtures/pr/test_one_page.log.expected @@ -0,0 +1,66 @@ + + +{last_modified_time} test_one_page.log Page 1 + + +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + diff --git a/tests/fixtures/pr/test_one_page_double_line.log.expected b/tests/fixtures/pr/test_one_page_double_line.log.expected new file mode 100644 index 000000000..e32101fcf --- /dev/null +++ b/tests/fixtures/pr/test_one_page_double_line.log.expected @@ -0,0 +1,132 @@ + + +{last_modified_time} test_one_page.log Page 1 + + +ntation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:56.705 Info: 802.1X changed + +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:56.854 Info: 802.1X changed + +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:57.002 Info: 802.1X changed + +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:57.152 Info: 802.1X changed + +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:57.302 Info: 802.1X changed + +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:57.449 Info: 802.1X changed + +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:57.600 Info: 802.1X changed + +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:57.749 Info: 802.1X changed + +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + + + + + + + + +{last_modified_time} test_one_page.log Page 2 + + +Mon Dec 10 11:42:57.896 Info: 802.1X changed + +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:58.045 Info: 802.1X changed + +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:58.193 Info: 802.1X changed + +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:58.342 Info: 802.1X changed + +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:58.491 Info: 802.1X changed + +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:58.640 Info: 802.1X changed + +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:58.805 Info: 802.1X changed + +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:58.958 Info: 802.1X changed + +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:59.155 Info: 802.1X changed + +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + +Mon Dec 10 11:42:59.352 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 new file mode 100644 index 000000000..303f01c73 --- /dev/null +++ b/tests/fixtures/pr/test_one_page_first_line.log.expected @@ -0,0 +1,66 @@ + + +{last_modified_time} test_one_page.log Page 1 + + + 5 ntation processAirPortStateChanges]: pppConnectionState 0 + 6 Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 7 Mon Dec 10 11:42:56.705 Info: 802.1X changed + 8 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 9 Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 10 Mon Dec 10 11:42:56.854 Info: 802.1X changed + 11 Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 12 Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 13 Mon Dec 10 11:42:57.002 Info: 802.1X changed + 14 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 15 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 16 Mon Dec 10 11:42:57.152 Info: 802.1X changed + 17 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 18 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 19 Mon Dec 10 11:42:57.302 Info: 802.1X changed + 20 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 21 Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 22 Mon Dec 10 11:42:57.449 Info: 802.1X changed + 23 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 24 Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 25 Mon Dec 10 11:42:57.600 Info: 802.1X changed + 26 Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 27 Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 28 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 29 Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 30 Mon Dec 10 11:42:57.749 Info: 802.1X changed + 31 Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 32 Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 33 Mon Dec 10 11:42:57.896 Info: 802.1X changed + 34 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 35 Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 36 Mon Dec 10 11:42:58.045 Info: 802.1X changed + 37 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 38 Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 39 Mon Dec 10 11:42:58.193 Info: 802.1X changed + 40 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 41 Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 42 Mon Dec 10 11:42:58.342 Info: 802.1X changed + 43 Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 44 Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 45 Mon Dec 10 11:42:58.491 Info: 802.1X changed + 46 Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 47 Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 48 Mon Dec 10 11:42:58.640 Info: 802.1X changed + 49 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 50 Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 51 Mon Dec 10 11:42:58.805 Info: 802.1X changed + 52 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 53 Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 54 Mon Dec 10 11:42:58.958 Info: 802.1X changed + 55 Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 56 Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 57 Mon Dec 10 11:42:59.155 Info: 802.1X changed + 58 Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 59 Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 60 Mon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + diff --git a/tests/fixtures/pr/test_one_page_header.log.expected b/tests/fixtures/pr/test_one_page_header.log.expected new file mode 100644 index 000000000..a00d5f855 --- /dev/null +++ b/tests/fixtures/pr/test_one_page_header.log.expected @@ -0,0 +1,66 @@ + + +{last_modified_time} {header} Page 1 + + +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed + + + + + diff --git a/tests/fixtures/pr/test_one_page_no_ht.log.expected b/tests/fixtures/pr/test_one_page_no_ht.log.expected new file mode 100644 index 000000000..2abea9890 --- /dev/null +++ b/tests/fixtures/pr/test_one_page_no_ht.log.expected @@ -0,0 +1,57 @@ +ntation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.558 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.705 Info: 802.1X changed +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.706 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:56.854 Info: 802.1X changed +Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.002 Info: 802.1X changed +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.152 Info: 802.1X changed +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.302 Info: 802.1X changed +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.304 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.449 Info: 802.1X changed +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.451 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.600 Info: 802.1X changed +Mon Dec 10 11:42:57.601 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.602 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.624 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.749 Info: 802.1X changed +Mon Dec 10 11:42:57.750 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.751 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:57.896 Info: 802.1X changed +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:57.897 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.045 Info: 802.1X changed +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.047 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.193 Info: 802.1X changed +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.195 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.342 Info: 802.1X changed +Mon Dec 10 11:42:58.343 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.344 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.491 Info: 802.1X changed +Mon Dec 10 11:42:58.493 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.494 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.640 Info: 802.1X changed +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.642 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.805 Info: 802.1X changed +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.806 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:58.958 Info: 802.1X changed +Mon Dec 10 11:42:58.959 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:58.960 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.155 Info: 802.1X changed +Mon Dec 10 11:42:59.157 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 11:42:59.159 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 11:42:59.352 Info: 802.1X changed + diff --git a/tests/fixtures/pr/test_page_length.log.expected b/tests/fixtures/pr/test_page_length.log.expected new file mode 100644 index 000000000..8f4ab82d1 --- /dev/null +++ b/tests/fixtures/pr/test_page_length.log.expected @@ -0,0 +1,200 @@ + + +{last_modified_time} test.log Page 2 + + + 91 Mon Dec 10 11:43:31.748 )} took 0.0025 seconds, returned 10 results + 92 Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 4 does not require a live scan + 93 Mon Dec 10 11:43:31.748 Scan: Cache-assisted scan request on channel 5 does not require a live scan + 94 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 6 does not require a live scan + 95 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request does not require a live scan + 96 Mon Dec 10 11:43:31.749 AutoJoin: Successful cache-assisted background scan request with channels {( + 97 Mon Dec 10 11:43:31.749 [channelNumber=4(2GHz), channelWidth={20MHz}, active], + 98 Mon Dec 10 11:43:31.749 [channelNumber=5(2GHz), channelWidth={20MHz}, active], + 99 Mon Dec 10 11:43:31.749 [channelNumber=6(2GHz), channelWidth={20MHz}, active] + 100 Mon Dec 10 11:43:31.749 )} took 0.0008 seconds, returned 7 results + 101 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 7 does not require a live scan + 102 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 8 does not require a live scan + 103 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 9 does not require a live scan + 104 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request does not require a live scan + 105 Mon Dec 10 11:43:31.749 AutoJoin: Successful cache-assisted background scan request with channels {( + 106 Mon Dec 10 11:43:31.749 [channelNumber=7(2GHz), channelWidth={20MHz}, active], + 107 Mon Dec 10 11:43:31.749 [channelNumber=8(2GHz), channelWidth={20MHz}, active], + 108 Mon Dec 10 11:43:31.749 [channelNumber=9(2GHz), channelWidth={20MHz}, active] + 109 Mon Dec 10 11:43:31.749 )} took 0.0002 seconds, returned 1 results + 110 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 10 does not require a live scan + 111 Mon Dec 10 11:43:31.749 Scan: Cache-assisted scan request on channel 11 does not require a live scan + 112 Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 12 does not require a live scan + 113 Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request does not require a live scan + 114 Mon Dec 10 11:43:31.750 AutoJoin: Successful cache-assisted background scan request with channels {( + 115 Mon Dec 10 11:43:31.750 [channelNumber=10(2GHz), channelWidth={20MHz}, active], + 116 Mon Dec 10 11:43:31.750 [channelNumber=11(2GHz), channelWidth={20MHz}, active], + 117 Mon Dec 10 11:43:31.750 [channelNumber=12(2GHz), channelWidth={20MHz}, active] + 118 Mon Dec 10 11:43:31.750 )} took 0.0004 seconds, returned 4 results + 119 Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 13 does not require a live scan + 120 Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 36 does not require a live scan + 121 Mon Dec 10 11:43:31.750 Scan: Cache-assisted scan request on channel 40 does not require a live scan + 122 Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request does not require a live scan + 123 Mon Dec 10 11:43:31.751 AutoJoin: Successful cache-assisted background scan request with channels {( + 124 Mon Dec 10 11:43:31.751 [channelNumber=13(2GHz), channelWidth={20MHz}, active], + 125 Mon Dec 10 11:43:31.751 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], + 126 Mon Dec 10 11:43:31.751 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active] + 127 Mon Dec 10 11:43:31.751 )} took 0.0009 seconds, returned 9 results + 128 Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request on channel 44 does not require a live scan + 129 Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request on channel 48 does not require a live scan + 130 Mon Dec 10 11:43:31.751 Scan: Cache-assisted scan request on channel 149 does not require a live scan + 131 Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request does not require a live scan + 132 Mon Dec 10 11:43:31.752 AutoJoin: Successful cache-assisted background scan request with channels {( + 133 Mon Dec 10 11:43:31.752 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], + 134 Mon Dec 10 11:43:31.752 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], + 135 Mon Dec 10 11:43:31.752 [channelNumber=149(5GHz), channelWidth={20MHz}, active] + 136 Mon Dec 10 11:43:31.752 )} took 0.0010 seconds, returned 9 results + 137 Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request on channel 153 does not require a live scan + 138 Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request on channel 157 does not require a live scan + 139 Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request on channel 161 does not require a live scan + 140 Mon Dec 10 11:43:31.752 Scan: Cache-assisted scan request does not require a live scan + 141 Mon Dec 10 11:43:31.753 AutoJoin: Successful cache-assisted background scan request with channels {( + 142 Mon Dec 10 11:43:31.753 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], + 143 Mon Dec 10 11:43:31.753 [channelNumber=157(5GHz), channelWidth={20MHz}, active], + 144 Mon Dec 10 11:43:31.753 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active] + 145 Mon Dec 10 11:43:31.753 )} took 0.0007 seconds, returned 9 results + 146 Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 165 does not require a live scan + 147 Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 52 does not require a live scan + 148 Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 56 does not require a live scan + 149 Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request does not require a live scan + 150 Mon Dec 10 11:43:31.753 AutoJoin: Successful cache-assisted background scan request with channels {( + 151 Mon Dec 10 11:43:31.753 [channelNumber=165(5GHz), channelWidth={20MHz}, active], + 152 Mon Dec 10 11:43:31.753 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], + 153 Mon Dec 10 11:43:31.753 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] + 154 Mon Dec 10 11:43:31.753 )} took 0.0005 seconds, returned 6 results + 155 Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 60 does not require a live scan + 156 Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request on channel 64 does not require a live scan + 157 Mon Dec 10 11:43:31.753 Scan: Cache-assisted scan request does not require a live scan + 158 Mon Dec 10 11:43:31.753 AutoJoin: Successful cache-assisted background scan request with channels {( + 159 Mon Dec 10 11:43:31.754 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], + 160 Mon Dec 10 11:43:31.754 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] + 161 Mon Dec 10 11:43:31.754 )} took 0.0003 seconds, returned 4 results + 162 Mon Dec 10 11:43:42.382 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) + 163 Mon Dec 10 11:43:42.382 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=270 Mbps + 164 Mon Dec 10 11:43:42.383 Info: link quality changed + 165 Mon Dec 10 11:49:12.347 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) + 166 Mon Dec 10 11:49:12.350 Info: QUERY SCAN CACHE request received from pid 92 (locationd) + 167 Mon Dec 10 11:52:32.194 Info: SCAN request received from pid 92 (locationd) with priority 2 + 168 Mon Dec 10 11:52:32.448 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) + 169 Mon Dec 10 11:52:32.450 Info: QUERY SCAN CACHE request received from pid 92 (locationd) + 170 Mon Dec 10 11:52:32.451 AutoJoin: Successful cache-assisted scan request for locationd with channels {( + 171 Mon Dec 10 11:52:32.451 [channelNumber=1(2GHz), channelWidth={20MHz}, active], + 172 Mon Dec 10 11:52:32.451 [channelNumber=2(2GHz), channelWidth={20MHz}, active], + 173 Mon Dec 10 11:52:32.451 [channelNumber=3(2GHz), channelWidth={20MHz}, active], + 174 Mon Dec 10 11:52:32.451 [channelNumber=4(2GHz), channelWidth={20MHz}, active], + 175 Mon Dec 10 11:52:32.451 [channelNumber=5(2GHz), channelWidth={20MHz}, active], + 176 Mon Dec 10 11:52:32.451 [channelNumber=6(2GHz), channelWidth={20MHz}, active] + 177 Mon Dec 10 11:52:32.451 )} took 0.2566 seconds, returned 10 results + 178 Mon Dec 10 11:52:32.451 Info: scan cache updated + 179 Mon Dec 10 11:52:32.712 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) + 180 Mon Dec 10 11:52:32.715 Info: QUERY SCAN CACHE request received from pid 92 (locationd) + + + + + + + +{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 {( + 182 Mon Dec 10 11:52:32.715 [channelNumber=7(2GHz), channelWidth={20MHz}, active], + 183 Mon Dec 10 11:52:32.715 [channelNumber=8(2GHz), channelWidth={20MHz}, active], + 184 Mon Dec 10 11:52:32.715 [channelNumber=9(2GHz), channelWidth={20MHz}, active], + 185 Mon Dec 10 11:52:32.715 [channelNumber=10(2GHz), channelWidth={20MHz}, active], + 186 Mon Dec 10 11:52:32.715 [channelNumber=11(2GHz), channelWidth={20MHz}, active], + 187 Mon Dec 10 11:52:32.715 [channelNumber=12(2GHz), channelWidth={20MHz}, active] + 188 Mon Dec 10 11:52:32.715 )} took 0.2636 seconds, returned 10 results + 189 Mon Dec 10 11:52:32.994 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) + 190 Mon Dec 10 11:52:32.997 Info: QUERY SCAN CACHE request received from pid 92 (locationd) + 191 Mon Dec 10 11:52:32.998 AutoJoin: Successful cache-assisted scan request for locationd with channels {( + 192 Mon Dec 10 11:52:32.998 [channelNumber=13(2GHz), channelWidth={20MHz}, active], + 193 Mon Dec 10 11:52:32.998 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], + 194 Mon Dec 10 11:52:32.998 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active], + 195 Mon Dec 10 11:52:32.998 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], + 196 Mon Dec 10 11:52:32.998 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], + 197 Mon Dec 10 11:52:32.998 [channelNumber=149(5GHz), channelWidth={20MHz}, active] + 198 Mon Dec 10 11:52:32.998 )} took 0.2822 seconds, returned 14 results + 199 Mon Dec 10 11:52:33.405 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) + 200 Mon Dec 10 11:52:33.408 Info: QUERY SCAN CACHE request received from pid 92 (locationd) + 201 Mon Dec 10 11:52:33.409 AutoJoin: Successful cache-assisted scan request for locationd with channels {( + 202 Mon Dec 10 11:52:33.409 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], + 203 Mon Dec 10 11:52:33.409 [channelNumber=157(5GHz), channelWidth={20MHz}, active], + 204 Mon Dec 10 11:52:33.409 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active], + 205 Mon Dec 10 11:52:33.409 [channelNumber=165(5GHz), channelWidth={20MHz}, active], + 206 Mon Dec 10 11:52:33.409 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], + 207 Mon Dec 10 11:52:33.409 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] + 208 Mon Dec 10 11:52:33.409 )} took 0.4099 seconds, returned 11 results + 209 Mon Dec 10 11:52:33.669 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) + 210 Mon Dec 10 11:52:33.672 Info: QUERY SCAN CACHE request received from pid 92 (locationd) + 211 Mon Dec 10 11:52:33.672 AutoJoin: Successful cache-assisted scan request for locationd with channels {( + 212 Mon Dec 10 11:52:33.672 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], + 213 Mon Dec 10 11:52:33.672 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] + 214 Mon Dec 10 11:52:33.672 )} took 0.2625 seconds, returned 8 results + 215 Mon Dec 10 11:52:33.673 Info: scan cache updated + 216 Mon Dec 10 11:52:33.693 Info: SCAN request received from pid 92 (locationd) with priority 2 + 217 Mon Dec 10 11:52:33.693 Scan: locationd requested a live scan less than 10 seconds after previous request (1.4991s) returning cached scan results + 218 Mon Dec 10 11:52:33.728 Info: SCAN request received from pid 92 (locationd) with priority 2 + 219 Mon Dec 10 11:52:33.728 Scan: locationd requested a live scan less than 10 seconds after previous request (1.5339s) returning cached scan results + 220 Mon Dec 10 11:55:47.609 Driver Discovery: _PMConnectionHandler: caps = CPU Net Disk + 221 Mon Dec 10 11:55:47.609 Driver Discovery: _PMConnectionHandler: Being put into maintenance wake mode while fully awake. + 222 Mon Dec 10 11:55:47.610 Info: psCallback: powerSource = AC Power + 223 Mon Dec 10 11:55:47.610 Info: psCallback: set powersave disabled on en0 + 224 Mon Dec 10 11:55:47.637 Info: RELINQUISH BT PAGING LOCK request received from pid 106 (bluetoothd) + 225 Mon Dec 10 11:55:47.637 Info: RELINQUISH BT PAGING LOCK request received from pid 106 (bluetoothd) + 226 Mon Dec 10 11:55:47.638 BTC: BT PAGING state already set to 0 + 227 Mon Dec 10 11:55:47.638 BTC: BT PAGING state already set to 0 + 228 Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED after 0.0 seconds + 229 Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED after 0.0 seconds + 230 Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED, re-enabling deferred WiFi requests + 231 Mon Dec 10 11:55:47.638 Info: BT PAGING LOCK RELINQUISHED, re-enabling deferred WiFi requests + 232 Mon Dec 10 11:55:48.093 IPC: ADDED XPC CLIENT CONNECTION [loginwindow (pid=101, euid=1651299376, egid=604256670)] + 233 Mon Dec 10 11:55:48.093 Info: START MONITORING EVENT request received from pid 101 (loginwindow) + 234 Mon Dec 10 11:55:48.093 Info: START MONITORING EVENT request received from pid 101 (loginwindow) + 235 Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) + 236 Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) + 237 Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) + 238 Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) + 239 Mon Dec 10 11:55:48.094 Info: START MONITORING EVENT request received from pid 101 (loginwindow) + 240 Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) + 241 Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) + 242 Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) + 243 Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) + 244 Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) + 245 Mon Dec 10 11:55:48.104 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) + 246 Mon Dec 10 11:55:48.105 Info: STOP MONITORING EVENT request received from pid 101 (loginwindow) + 247 Mon Dec 10 11:56:07.629 Driver Discovery: _PMConnectionHandler: caps = + 248 Mon Dec 10 11:56:07.629 AutoJoin: BEST CONNECTED SCAN CANCELLED on interface en0 + 249 Mon Dec 10 11:56:07.629 AutoJoin: BACKGROUND SCAN CANCELLED on interface en0 + 250 Mon Dec 10 11:56:07.629 AutoJoin: Auto-join retry cancelled on interface en0 + 251 Mon Dec 10 11:56:07.629 Offload: _tcpKeepAliveActive: TCP keep-alive is active. + 252 Mon Dec 10 11:56:07.637 P2P: _changeInterfaceFlags: Marking p2p0 down + 253 Mon Dec 10 11:56:07.637 Info: SleepAcknowledgementCheckForHostAP: Checking sleep readiness for HostAP + 254 Mon Dec 10 11:56:07.637 SleepAcknowledgementCheck: Checking sleep readiness + 255 Mon Dec 10 11:56:07.637 SleepAcknowledgementCheck: Delaying sleep acknowledgement because of VifUp + 256 Mon Dec 10 11:56:07.638 _interfaceFlagsChanged: KEV_DL_SIFFLAGS received for p2p0 [flags=0xffff8802 (down)]. + 257 Mon Dec 10 11:56:07.638 _interfaceFlagsChanged: Flags changed for p2p0 (0xffff8843 -> 0xffff8802) (down). + 258 Mon Dec 10 11:56:07.638 P2P: _deviceInterfaceMarkedDown: p2p0 marked down + 259 Mon Dec 10 11:56:07.638 P2P: _removeTimeoutForActionAndParam: Attempting to remove 'Stop GO' action (param = 0x0) + 260 Mon Dec 10 11:56:07.638 P2P: _removeTimeoutForActionAndParam: Attempting to remove 'Scan' action (param = 0x0) + 261 Mon Dec 10 11:56:07.638 P2P: _p2pSupervisorEventRunLoopCallback: Mark down complete for p2p0 + 262 Mon Dec 10 11:56:07.638 SleepAcknowledgementCheck: Checking sleep readiness + 263 Mon Dec 10 11:56:07.638 WoW: SleepAcknowledgementCheck: Checking if auto-join is in progress before sleep acknowledgement + 264 Mon Dec 10 11:56:07.638 WoW: SleepAcknowledgementDelayForAutoJoinAttempt_block_invoke: AUTO-JOIN attempt complete for en0, re-checking sleep readiness + 265 Mon Dec 10 11:56:07.638 SleepAcknowledgementCheck: Checking sleep readiness + 266 Mon Dec 10 11:56:07.639 WoW: _wowEnabled: WoW is active on en0 + 267 Mon Dec 10 11:56:07.639 WoW: wowExchangeRequiredForNode: WoW exchange not required for en0 + 268 Mon Dec 10 11:56:07.639 _acknowledgeSleepEvent: Acknowledging sleep event + 269 Mon Dec 10 11:56:07.639 Info: PRIORITY LOCK ADDED [client=airportd, type=4, interface=(null), priority=7] + 270 Mon Dec 10 11:56:07.640 AutoJoin: Auto-join retry cancelled on interface en0 + + + + + diff --git a/tests/fixtures/pr/test_page_length1.log.expected b/tests/fixtures/pr/test_page_length1.log.expected new file mode 100644 index 000000000..a09a2a986 --- /dev/null +++ b/tests/fixtures/pr/test_page_length1.log.expected @@ -0,0 +1,12 @@ + 6 Mon Dec 10 11:42:56.854 Info: 802.1X changed + 7 Mon Dec 10 11:42:56.855 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 8 Mon Dec 10 11:42:56.856 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 9 Mon Dec 10 11:42:57.002 Info: 802.1X changed + 10 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + + 11 Mon Dec 10 11:42:57.003 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 12 Mon Dec 10 11:42:57.152 Info: 802.1X changed + 13 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 + 14 Mon Dec 10 11:42:57.154 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars + 15 Mon Dec 10 11:42:57.302 Info: 802.1X changed + diff --git a/tests/fixtures/pr/test_page_range_1.log.expected b/tests/fixtures/pr/test_page_range_1.log.expected new file mode 100644 index 000000000..f254261d4 --- /dev/null +++ b/tests/fixtures/pr/test_page_range_1.log.expected @@ -0,0 +1,264 @@ + + +{last_modified_time} test.log Page 15 + + +Mon Dec 10 12:05:48.183 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.183 )} took 0.0007 seconds, returned 4 results +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 13 does not require a live scan +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 36 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 40 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.184 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.184 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.184 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:48.184 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:48.184 )} took 0.0007 seconds, returned 5 results +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 44 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 48 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 149 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.185 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.185 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:48.185 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:48.185 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.185 )} took 0.0006 seconds, returned 4 results +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 153 does not require a live scan +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 157 does not require a live scan +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 161 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.186 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.186 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:48.186 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.186 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:48.186 )} took 0.0010 seconds, returned 7 results +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 165 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 52 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 56 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.187 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.187 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.187 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:48.187 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:48.187 )} took 0.0008 seconds, returned 5 results +Mon Dec 10 12:05:48.187 Scan: Cache-assisted scan request on channel 60 does not require a live scan +Mon Dec 10 12:05:48.187 Scan: Cache-assisted scan request on channel 64 does not require a live scan +Mon Dec 10 12:05:48.188 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.188 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.188 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:48.188 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:48.188 )} took 0.0013 seconds, returned 8 results +Mon Dec 10 12:05:50.375 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:50.375 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=216 Mbps +Mon Dec 10 12:05:50.376 Info: link quality changed +Mon Dec 10 12:05:55.378 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:55.378 Info: _bsd_80211_event_callback: link quality: RSSI=-56 dBm TxRate=243 Mbps +Mon Dec 10 12:05:55.379 Info: link quality changed +Mon Dec 10 12:06:28.759 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:06:28.763 Info: AWDL started +Mon Dec 10 12:06:28.763 Driver Event: _bsd_80211_event_callback: CHANNEL_SWITCH (en0) +Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE-BAND, SINGLE-AP for 2.4GHz on en0 +Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE-BAND, SINGLE-AP for 5GHz on en0 + + + + + + + +{last_modified_time} test.log Page 16 + + +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/ProfileID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEP40' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID_STR' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AirPlay' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AutoJoinTimestamp' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BSSID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CHANNEL' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Busy' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Power Status' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEPOPENSYSTEM' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CachedScanRecord' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/UserMode8021X' +Mon Dec 10 12:06:28.771 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BusyUI' +Mon Dec 10 12:06:28.945 Info: INTERFACE STATE INFO request received from pid 362 (sharingd) +Mon Dec 10 12:06:28.946 Info: -[CWXPCInterfaceContext __copyMACAddressForInterface:]: MAC address: <82cd0ac3 bf73> +Mon Dec 10 12:06:30.064 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:30.151 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:30.151 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.137 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.138 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.832 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.832 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:48.742 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:48.742 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.121 P2P: _terminateGroupOwnerTimer: Terminate group owner timer notification received. +Mon Dec 10 12:06:49.267 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.267 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.793 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.793 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.931 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:06:50.931 Driver Event: _bsd_80211_event_callback: AWDL_STATISTICS (awdl0) +Mon Dec 10 12:06:50.932 Info: AWDL real time mode ended +Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:06:50.945 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:06:50.945 {type = mutable dict, count = 2, +Mon Dec 10 12:06:50.945 entries => +Mon Dec 10 12:06:50.945 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.945 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.945 } +Mon Dec 10 12:06:50.945 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:06:50.945 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:06:50.945 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:06:50.945 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> + + + + + + + +{last_modified_time} test.log Page 17 + + +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:06:50.945 Info: AWDL real time mode ended +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:06:50.946 {type = mutable dict, count = 2, +Mon Dec 10 12:06:50.946 entries => +Mon Dec 10 12:06:50.946 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.946 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.946 } +Mon Dec 10 12:06:50.946 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:06:50.946 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:06:50.947 Info: AWDL ended +Mon Dec 10 12:06:50.951 Info: -[CWXPCInterfaceContext __submitAWDLUsageMetric:duration:]: AWDL usage metric data: CWAWDMetricAwdlUsageData: selfInfraChannel 40, peerInfraChannel 0, numOfPeers 6. Keys: Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90013 +Mon Dec 10 12:06:50.952 Info: INTERFACE STATE INFO request received from pid 362 (sharingd) +Mon Dec 10 12:06:50.952 Info: -[CWXPCInterfaceContext __copyMACAddressForInterface:]: MAC address: <82cd0ac3 bf73> +Mon Dec 10 12:06:50.953 Roam: ROAMING PROFILES updated to AC POWER for 2.4GHz on en0 +Mon Dec 10 12:06:50.953 Roam: ROAMING PROFILES updated to AC POWER for 5GHz on en0 +Mon Dec 10 12:06:53.680 Info: -[CWXPCSubsystem handleDeviceCountMetricQuery:]_block_invoke: DeviceCount metric data: CWAWDMetricDeviceCountData: timeSinceBoot: 1515466.360642, deviceCount: 1 +Mon Dec 10 12:06:53.684 Info: -[CWXPCSubsystem handleNetworkPrefsMetricQuery:]: NetworkPrefs metric data: CWAWDMetricNetworkPrefsData: preferred 15 hidden 0 open 1 wep 0 wpa 12 eap 2 +Mon Dec 10 12:06:53.684 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90004 +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90001 +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x9000d +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x9000b +Mon Dec 10 12:12:03.594 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:03.594 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=216 Mbps +Mon Dec 10 12:12:03.595 Info: link quality changed +Mon Dec 10 12:12:09.598 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:09.598 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=270 Mbps +Mon Dec 10 12:12:09.599 Info: link quality changed +Mon Dec 10 12:12:56.625 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:56.625 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 12:12:56.625 Info: link quality changed +Mon Dec 10 12:13:01.625 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:01.625 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=243 Mbps +Mon Dec 10 12:13:01.626 Info: link quality changed +Mon Dec 10 12:13:06.628 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:06.628 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 12:13:06.628 Info: link quality changed +Mon Dec 10 12:13:27.639 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:27.639 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=243 Mbps +Mon Dec 10 12:13:27.640 Info: link quality changed + + + + + + + +{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 +Mon Dec 10 12:14:46.902 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:46.905 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:46.906 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:46.906 [channelNumber=1(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=2(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=3(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=4(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=5(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:46.906 [channelNumber=6(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:14:46.906 )} took 0.2478 seconds, returned 13 results +Mon Dec 10 12:14:46.906 Info: scan cache updated +Mon Dec 10 12:14:47.158 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:47.160 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:47.160 [channelNumber=7(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=8(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=9(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=10(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=11(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.160 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:14:47.160 )} took 0.2532 seconds, returned 4 results +Mon Dec 10 12:14:47.161 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:47.433 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:47.436 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:47.437 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:47.437 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.437 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.437 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:14:47.437 )} took 0.2763 seconds, returned 11 results +Mon Dec 10 12:14:47.778 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:47.781 Info: QUERY SCAN CACHE request received from pid 92 (locationd) +Mon Dec 10 12:14:47.782 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:47.782 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.782 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.782 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:14:47.782 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:14:47.782 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:14:47.782 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:14:47.782 )} took 0.3436 seconds, returned 9 results +Mon Dec 10 12:14:48.052 Driver Event: _bsd_80211_event_callback: SCAN_CACHE_UPDATED (en0) +Mon Dec 10 12:14:48.055 AutoJoin: Successful cache-assisted scan request for locationd with channels {( +Mon Dec 10 12:14:48.055 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:14:48.055 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:14:48.055 )} took 0.2714 seconds, returned 6 results +Mon Dec 10 12:14:48.055 Info: QUERY SCAN CACHE request received from pid 92 (locationd) + + + + + + + + + + + + + diff --git a/tests/fixtures/pr/test_page_range_2.log.expected b/tests/fixtures/pr/test_page_range_2.log.expected new file mode 100644 index 000000000..4f260eb65 --- /dev/null +++ b/tests/fixtures/pr/test_page_range_2.log.expected @@ -0,0 +1,198 @@ + + +{last_modified_time} test.log Page 15 + + +Mon Dec 10 12:05:48.183 [channelNumber=12(2GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.183 )} took 0.0007 seconds, returned 4 results +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 13 does not require a live scan +Mon Dec 10 12:05:48.183 Scan: Cache-assisted scan request on channel 36 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 40 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.184 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.184 [channelNumber=13(2GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.184 [channelNumber=36(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:48.184 [channelNumber=40(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:48.184 )} took 0.0007 seconds, returned 5 results +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 44 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 48 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request on channel 149 does not require a live scan +Mon Dec 10 12:05:48.184 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.185 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.185 [channelNumber=44(5GHz), channelWidth={40MHz(+1)}, active], +Mon Dec 10 12:05:48.185 [channelNumber=48(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:48.185 [channelNumber=149(5GHz), channelWidth={20MHz}, active] +Mon Dec 10 12:05:48.185 )} took 0.0006 seconds, returned 4 results +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 153 does not require a live scan +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 157 does not require a live scan +Mon Dec 10 12:05:48.185 Scan: Cache-assisted scan request on channel 161 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.186 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.186 [channelNumber=153(5GHz), channelWidth={40MHz(-1)}, active], +Mon Dec 10 12:05:48.186 [channelNumber=157(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.186 [channelNumber=161(5GHz), channelWidth={40MHz(-1)}, active] +Mon Dec 10 12:05:48.186 )} took 0.0010 seconds, returned 7 results +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 165 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 52 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request on channel 56 does not require a live scan +Mon Dec 10 12:05:48.186 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.187 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.187 [channelNumber=165(5GHz), channelWidth={20MHz}, active], +Mon Dec 10 12:05:48.187 [channelNumber=52(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:48.187 [channelNumber=56(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:48.187 )} took 0.0008 seconds, returned 5 results +Mon Dec 10 12:05:48.187 Scan: Cache-assisted scan request on channel 60 does not require a live scan +Mon Dec 10 12:05:48.187 Scan: Cache-assisted scan request on channel 64 does not require a live scan +Mon Dec 10 12:05:48.188 Scan: Cache-assisted scan request does not require a live scan +Mon Dec 10 12:05:48.188 AutoJoin: Successful cache-assisted background scan request with channels {( +Mon Dec 10 12:05:48.188 [channelNumber=60(5GHz), channelWidth={40MHz(+1)}, DFS], +Mon Dec 10 12:05:48.188 [channelNumber=64(5GHz), channelWidth={40MHz(-1)}, DFS] +Mon Dec 10 12:05:48.188 )} took 0.0013 seconds, returned 8 results +Mon Dec 10 12:05:50.375 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:50.375 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=216 Mbps +Mon Dec 10 12:05:50.376 Info: link quality changed +Mon Dec 10 12:05:55.378 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:05:55.378 Info: _bsd_80211_event_callback: link quality: RSSI=-56 dBm TxRate=243 Mbps +Mon Dec 10 12:05:55.379 Info: link quality changed +Mon Dec 10 12:06:28.759 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:06:28.763 Info: AWDL started +Mon Dec 10 12:06:28.763 Driver Event: _bsd_80211_event_callback: CHANNEL_SWITCH (en0) +Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE-BAND, SINGLE-AP for 2.4GHz on en0 +Mon Dec 10 12:06:28.765 Roam: ROAMING PROFILES updated to SINGLE-BAND, SINGLE-AP for 5GHz on en0 + + + + + + + +{last_modified_time} test.log Page 16 + + +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/ProfileID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEP40' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID_STR' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AirPlay' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/AutoJoinTimestamp' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BSSID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/SSID' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CHANNEL' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Busy' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/Power Status' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/WEPOPENSYSTEM' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/CachedScanRecord' +Mon Dec 10 12:06:28.770 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/UserMode8021X' +Mon Dec 10 12:06:28.771 SC: airportdProcessSystemConfigurationEvent: Processing 'State:/Network/Interface/en0/AirPort/BusyUI' +Mon Dec 10 12:06:28.945 Info: INTERFACE STATE INFO request received from pid 362 (sharingd) +Mon Dec 10 12:06:28.946 Info: -[CWXPCInterfaceContext __copyMACAddressForInterface:]: MAC address: <82cd0ac3 bf73> +Mon Dec 10 12:06:30.064 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:30.151 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:30.151 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.137 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.138 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.832 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:31.832 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:48.742 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:48.742 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.121 P2P: _terminateGroupOwnerTimer: Terminate group owner timer notification received. +Mon Dec 10 12:06:49.267 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.267 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.793 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:49.793 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.931 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:06:50.931 Driver Event: _bsd_80211_event_callback: AWDL_STATISTICS (awdl0) +Mon Dec 10 12:06:50.932 Info: AWDL real time mode ended +Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:06:50.945 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:06:50.945 {type = mutable dict, count = 2, +Mon Dec 10 12:06:50.945 entries => +Mon Dec 10 12:06:50.945 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.945 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.945 } +Mon Dec 10 12:06:50.945 +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:06:50.945 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:06:50.945 Driver Event: _bsd_80211_event_callback: AWDL_REALTIME_MODE_END (awdl0) +Mon Dec 10 12:06:50.945 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.945 BTC: __BluetoothCoexHandleUpdateForNode: Handle Bluetooth Coex: FrequencyBand <2>, Bluetooth Bandwidth Utilization <3>, Clamshell Mode <0> + + + + + + + +{last_modified_time} test.log Page 17 + + +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 2.4GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexSetProfile: profile for band 5GHz didn't change +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: band = 0x2 +Mon Dec 10 12:06:50.945 Info: AWDL real time mode ended +Mon Dec 10 12:06:50.945 BTC: BluetoothCoexHandle_ApplyPolicy: Bluetooth Coex: hosting AP = NO, assoc as STA = YES, assoced in 2.4GHz = NO +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: band = 2 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexGetCurrentBssidPhyMode: Bluetooth Coex: Active PHY Mode 16. PHY Mode +Mon Dec 10 12:06:50.946 {type = mutable dict, count = 2, +Mon Dec 10 12:06:50.946 entries => +Mon Dec 10 12:06:50.946 0 : {contents = "PHYMODE_ACTIVE"} = {value = +16, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.946 1 : {contents = "PHYMODE_SUPPORTED"} = {value = +159, type = kCFNumberSInt32Type} +Mon Dec 10 12:06:50.946 } +Mon Dec 10 12:06:50.946 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: PHY mode: <10> 5GHz: YES +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: MCS index set size = 16, NSS = 2SS, need to re-assoc = YES +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Bluetooth Coex: 11bg only = NO, BT on = YES, # HIDs = 0, # A2DP = 0, # SCO = 0, fallback = normal -> Middle Chain is ON +Mon Dec 10 12:06:50.946 Info: -[AirPortExtraImplementation processAirPortStateChanges]: pppConnectionState 0 +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexSettingPerChainPower: Chain Power Setting does not need to be updated +Mon Dec 10 12:06:50.946 BTC: BluetoothCoexHandle_ReconfigureAntennas: Skipping REASSOC - The # of chains did not change. +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Info: -[AirPortExtraImplementation processAirPortStateChanges]: old state=4 bars, new state=4 bars +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_PEER_PRESENCE (awdl0) +Mon Dec 10 12:06:50.946 Driver Event: _bsd_80211_event_callback: AWDL_SYNC_STATE_CHANGED (awdl0) +Mon Dec 10 12:06:50.947 Info: AWDL ended +Mon Dec 10 12:06:50.951 Info: -[CWXPCInterfaceContext __submitAWDLUsageMetric:duration:]: AWDL usage metric data: CWAWDMetricAwdlUsageData: selfInfraChannel 40, peerInfraChannel 0, numOfPeers 6. Keys: Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90013 +Mon Dec 10 12:06:50.952 Info: INTERFACE STATE INFO request received from pid 362 (sharingd) +Mon Dec 10 12:06:50.952 Info: -[CWXPCInterfaceContext __copyMACAddressForInterface:]: MAC address: <82cd0ac3 bf73> +Mon Dec 10 12:06:50.953 Roam: ROAMING PROFILES updated to AC POWER for 2.4GHz on en0 +Mon Dec 10 12:06:50.953 Roam: ROAMING PROFILES updated to AC POWER for 5GHz on en0 +Mon Dec 10 12:06:53.680 Info: -[CWXPCSubsystem handleDeviceCountMetricQuery:]_block_invoke: DeviceCount metric data: CWAWDMetricDeviceCountData: timeSinceBoot: 1515466.360642, deviceCount: 1 +Mon Dec 10 12:06:53.684 Info: -[CWXPCSubsystem handleNetworkPrefsMetricQuery:]: NetworkPrefs metric data: CWAWDMetricNetworkPrefsData: preferred 15 hidden 0 open 1 wep 0 wpa 12 eap 2 +Mon Dec 10 12:06:53.684 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90004 +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x90001 +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x9000d +Mon Dec 10 12:06:53.852 Info: -[CWAWDManager submitMetric:]: submitting metric id 0x9000b +Mon Dec 10 12:12:03.594 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:03.594 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=216 Mbps +Mon Dec 10 12:12:03.595 Info: link quality changed +Mon Dec 10 12:12:09.598 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:09.598 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=270 Mbps +Mon Dec 10 12:12:09.599 Info: link quality changed +Mon Dec 10 12:12:56.625 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:12:56.625 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 12:12:56.625 Info: link quality changed +Mon Dec 10 12:13:01.625 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:01.625 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=243 Mbps +Mon Dec 10 12:13:01.626 Info: link quality changed +Mon Dec 10 12:13:06.628 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:06.628 Info: _bsd_80211_event_callback: link quality: RSSI=-58 dBm TxRate=216 Mbps +Mon Dec 10 12:13:06.628 Info: link quality changed +Mon Dec 10 12:13:27.639 Driver Event: _bsd_80211_event_callback: LINK_QUALITY (en0) +Mon Dec 10 12:13:27.639 Info: _bsd_80211_event_callback: link quality: RSSI=-57 dBm TxRate=243 Mbps +Mon Dec 10 12:13:27.640 Info: link quality changed + + + + + diff --git a/tests/fixtures/ptx/gnu_ext_disabled_roff_auto_ref.expected b/tests/fixtures/ptx/gnu_ext_disabled_rightward_auto_ref.expected similarity index 100% rename from tests/fixtures/ptx/gnu_ext_disabled_roff_auto_ref.expected rename to tests/fixtures/ptx/gnu_ext_disabled_rightward_auto_ref.expected diff --git a/tests/fixtures/ptx/gnu_ext_disabled_roff_input_ref.expected b/tests/fixtures/ptx/gnu_ext_disabled_rightward_input_ref.expected similarity index 100% rename from tests/fixtures/ptx/gnu_ext_disabled_roff_input_ref.expected rename to tests/fixtures/ptx/gnu_ext_disabled_rightward_input_ref.expected diff --git a/tests/fixtures/ptx/gnu_ext_disabled_roff_no_ref.expected b/tests/fixtures/ptx/gnu_ext_disabled_rightward_no_ref.expected similarity index 100% rename from tests/fixtures/ptx/gnu_ext_disabled_roff_no_ref.expected rename to tests/fixtures/ptx/gnu_ext_disabled_rightward_no_ref.expected diff --git a/tests/fixtures/ptx/gnu_ext_disabled_roff_no_ref_word_regexp_exc_space.expected b/tests/fixtures/ptx/gnu_ext_disabled_rightward_no_ref_word_regexp_exc_space.expected similarity index 100% rename from tests/fixtures/ptx/gnu_ext_disabled_roff_no_ref_word_regexp_exc_space.expected rename to tests/fixtures/ptx/gnu_ext_disabled_rightward_no_ref_word_regexp_exc_space.expected diff --git a/tests/fixtures/tail/foobar_follow_multiple_appended.expected b/tests/fixtures/tail/foobar_follow_multiple_appended.expected index 0896d3743..891eb6920 100644 --- a/tests/fixtures/tail/foobar_follow_multiple_appended.expected +++ b/tests/fixtures/tail/foobar_follow_multiple_appended.expected @@ -1,4 +1,4 @@ ==> foobar.txt <== -doce -trece +twenty +thirty diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 9d73450f6..64329bd0c 100644 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -1,4 +1,7 @@ #!/bin/bash + +# spell-checker:ignore (paths) abmon deref discrim getlimits getopt ginstall gnulib inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW ; (vars/env) BUILDDIR SRCDIR + set -e if test ! -d ../gnu; then echo "Could not find ../gnu" @@ -96,4 +99,3 @@ sed -i 's|seq \$|/usr/bin/timeout 0.1 seq \$|' tests/misc/seq-precision.sh tests sed -i 's|cat |/usr/bin/timeout 0.1 cat |' tests/misc/cat-self.sh test -f "${BUILDDIR}/getlimits" || cp src/getlimits "${BUILDDIR}" - diff --git a/util/rewrite_rules.rs b/util/rewrite_rules.rs index 8b29bbe92..3d680e24c 100644 --- a/util/rewrite_rules.rs +++ b/util/rewrite_rules.rs @@ -1,4 +1,4 @@ -//! Rules to update the codebase using Rerast +//! Rules to update the codebase using `rerast` /// Converts try!() to ? fn try_to_question_mark>(r: Result) -> Result { diff --git a/util/run-gnu-test.sh b/util/run-gnu-test.sh index b9948ccd3..61034e015 100644 --- a/util/run-gnu-test.sh +++ b/util/run-gnu-test.sh @@ -1,4 +1,5 @@ #!/bin/bash +# spell-checker:ignore (env/vars) BUILDDIR GNULIB SUBDIRS set -e BUILDDIR="${PWD}/uutils/target/release" GNULIB_DIR="${PWD}/gnulib" diff --git a/util/update-version.sh b/util/update-version.sh index 042d43b71..c71467fc4 100644 --- a/util/update-version.sh +++ b/util/update-version.sh @@ -14,7 +14,7 @@ PROGS=$(ls -1d src/uu/*/Cargo.toml src/uu/stdbuf/src/libstdbuf/Cargo.toml Cargo. # update the version of all programs sed -i -e "s|version = \"$FROM\"|version = \"$TO\"|" $PROGS -# Update the stbuff stuff +# Update the stdbuf stuff sed -i -e "s|libstdbuf = { version=\"$FROM\"|libstdbuf = { version=\"$TO\"|" src/uu/stdbuf/Cargo.toml sed -i -e "s|= { optional=true, version=\"$FROM\", package=\"uu_|= { optional=true, version=\"$TO\", package=\"uu_|g" Cargo.toml @@ -22,5 +22,3 @@ sed -i -e "s|= { optional=true, version=\"$FROM\", package=\"uu_|= { optional=tr #sed -i -e "s|version = \"$UUCORE_FROM\"|version = \"$UUCORE_TO\"|" src/uucore/Cargo.toml # Update crates using uucore #sed -i -e "s|uucore = { version=\">=$UUCORE_FROM\",|uucore = { version=\">=$UUCORE_TO\",|" $PROGS - -