
names
=====

> join_cols(c("x", "y"), c("y", "y"))
Error: Input columns in `y` must be unique.
x Problem with `y`.

> join_cols(c("y", "y"), c("x", "y"))
Error: Input columns in `x` must be unique.
x Problem with `y`.


common by
=========

> xy <- c("x", "y")
> vars <- join_cols(xy, xy)
Message: Joining, by = c("x", "y")


by errors
=========

> join_cols(xy, c("a", "b"))
Error: `by` must be supplied when `x` and `y` have no common variables.
i use by = character()` to perform a cross-join.

> join_cols(xy, xy, by = FALSE)
Error: `by` must be a (named) character vector, list, or NULL, not a logical vector.

> join_cols(xy, xy, by = list(1, 2))
Error: join columns must be character vectors.

> join_cols(xy, xy, by = c("x", "x"))
Error: Join columns must be unique.
x Problem at position 2.

> join_cols(xy, xy, by = c("x", NA))
Error: Join columns must be not NA.
x Problem at position 2.

> join_cols(xy, xy, by = c("aaa", "bbb"))
Error: Join columns must be present in data.
x Problem with `aaa` and `bbb`.


suffixes
========

> join_cols(xy, xy, by = "x", suffix = "x")
Error: `suffix` must be a character vector of length 2.
i suffix is a character vector of length 1.

> join_cols(xy, xy, by = "x", suffix = c("", NA))
Error: `suffix` can't be NA.

