Skip to content

typos #1799

@musvaage

Description

@musvaage

Every time
Fixtures
different
encouragement
formatted
handler
ignores
invocation
messages
messages
message
occurred
output
received
similar
successful
suppress
surprising
things
visibility

$ grep -nr Everytime testthat
testthat/R/auto-test.R:4:#' you develop your code.  Everytime you save a file it will be automatically
testthat/man/auto_test.Rd:29:you develop your code.  Everytime you save a file it will be automatically
$ grep -nr Fixures testthat
testthat/NEWS.md:527:## Fixures
$ grep -nr diffefent testthat
testthat/tests/testthat/test-source.R:35:  ## They have diffefent names on Unix and Windows
$ grep -nr encouragment testthat
testthat/NEWS.md:1330:  get random encouragment if your tests don't pass.
$ grep -nr formated testthat
testthat/NEWS.md:1366:* Failure locations are now formated as R error locations.
$ grep -nr hander testthat
testthat/R/mock.R:23:#' @param .local_env Environment in which to add exit hander.
testthat/man/with_mock.Rd:20:\item{.local_env}{Environment in which to add exit hander.
$ grep -nr igores testthat
testthat/tests/testthat/test-expect-known.R:25:test_that("igores incomplete last line", {
$ grep -nr invokation testthat
testthat/NEWS.md:632:* Existence of restarts is first checked before invokation. This makes
$ grep -nr mesages testthat
testthat/NEWS.md:1195:for messages, warnings, errors, output etc), which invisibly return `NULL`. These functions are now more consistent: using `NA` will cause a failure if there is a errors/warnings/mesages/output (i.e. they're not missing), and will `NULL` fail if there aren't any errors/warnings/mesages/output. This previously didn't work for `expect_output()` (#323), and the error messages were confusing with `expect_error(..., NA)` (#342, @nealrichardson + @krlmlr, #317).
$ grep -nr messges testthat
testthat/NEWS.md:958:  failure messges for your own expectations.
$ grep -nr messsage testthat
testthat/NEWS.md:18:  warning, messsage) even when the `class` argument is used (#1168).
testthat/NEWS.md:460:  `expect_messsage()` to catch important messages (#1095).
testthat/R/expect-no-condition.R:71:  expect_no_("messsage", {{ object }}, regexp = message, class = class)
$ grep -nr occured testthat
testthat/NEWS.md:814:      This also eliminates the error that occured if tests can before the
testthat/NEWS.md:1491:to include source references so you can see exactly where failures occured.
$ grep -nr ouput testthat
testthat/NEWS.md:803:  creates ouput that should be more compatible with Jenkins (#806, @comicfans).
$ grep -nr recieved testthat
testthat/NEWS.md:1037:* `SummaryReporter` recieved a number of smaller tweaks
$ grep -nr similiar testthat
testthat/NEWS.md:1426:  interface. The language is similiar to RSpec for Ruby or Mocha for JavaScript.
testthat/R/describe.R:3:#' A simple BDD DSL for writing tests. The language is similiar to RSpec for
testthat/man/describe.Rd:18:A simple BDD DSL for writing tests. The language is similiar to RSpec for
$ grep -nr succesful testthat
testthat/NEWS.md:365:  runs if the latest run is succesful (#1314).
$ grep -nr supress testthat
testthat/tests/testthat/test-colour.R:1:test_that("can supress colours", {
$ grep -nr suprising testthat
testthat/vignettes/snapshotting.Rmd:276:        This seems like a small issue, but thinking of a good name, and managing the difference between interactive and test-time paths introduces a suprising amount of friction.
$ grep -nr thngs testthat
testthat/vignettes/snapshotting.Rmd:207:test_that("you can't add weird thngs", {
$ grep -nr visibilty testthat
testthat/tests/testthat/test-expect-invisible.R:1:test_that("basically principles of visibilty hold", {
$ 

the intention here is not clear

$ grep -nr wordly testthat
testthat/tests/testthat/test-expect-comparison.R:51:test_that("wordly versions are deprecated", {
$ 

As per @hadley, a portable script to be run within the package.

If uncommenting the three lines the relevant man/*.Rd files should be regenerated.

$ cat typos.sh
#!/bin/sh

# sed  -ie "s/Everytime/Every time/g" R/auto-test.R
sed  -ie "s/Fixures/Fixtures/g" NEWS.md
sed  -ie "s/diffefent/different/g" tests/testthat/test-source.R
sed  -ie "s/encouragment/encouragement/g" NEWS.md
sed  -ie "s/formated/formatted/g" NEWS.md
sed  -ie "s/igores/ignores/g" tests/testthat/test-expect-known.R
# sed  -ie "s/hander/handler/g" R/mock.R
sed  -ie "s/invokation/invocation/g" NEWS.md
sed  -ie "s/mesages/messages/g" NEWS.md
sed  -ie "s/messges/messages/g" NEWS.md
sed  -ie "s/messsage/message/g" NEWS.md
sed  -ie "s/messsage/message/g" R/expect-no-condition.R
sed  -ie "s/occured/occurred/g" NEWS.md
sed  -ie "s/ouput/output/g" NEWS.md
sed  -ie "s/recieved/received/g" NEWS.md
sed  -ie "s/similiar/similar/g" NEWS.md
# sed  -ie "s/similiar/similar/g" R/describe.R
sed  -ie "s/succesful/successful/g" NEWS.md
sed  -ie "s/supress/suppress/g" tests/testthat/test-colour.R
sed  -ie "s/suprising/surprising/g" vignettes/snapshotting.Rmd
sed  -ie "s/thngs/things/g" vignettes/snapshotting.Rmd
sed  -ie "s/visibilty/visibility/g" tests/testthat/test-expect-invisible.R
$ 

The commit included these tweaks.

tests/testthat/test-expect-comparison.R

- test_that("wordly versions are deprecated", {
+ test_that("wordy versions are deprecated", {

tests/testthat/test-expect-invisible.R

- test_that("basically principles of visibilty hold", {
+ test_that("basic principles of visibility hold", {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions