Skip to content

Commit

Permalink
refactor: Rename test names to case for init
Browse files Browse the repository at this point in the history
  • Loading branch information
Muscraft committed Feb 20, 2023
1 parent 08c6bb8 commit 41cd166
Show file tree
Hide file tree
Showing 38 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion tests/testsuite/init/auto_git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn auto_git() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/bin_already_exists_explicit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn bin_already_exists_explicit() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn bin_already_exists_explicit_nosrc() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/bin_already_exists_implicit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn bin_already_exists_implicit() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn bin_already_exists_implicit_namenosrc() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn bin_already_exists_implicit_namesrc() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn bin_already_exists_implicit_nosrc() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/both_lib_and_bin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cargo_test_support::prelude::*;
use cargo_test_support::curr_dir;

#[cargo_test]
fn both_lib_and_bin() {
fn case() {
let cwd = paths::root();

snapbox::cmd::Command::cargo_ui()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn cant_create_library_when_both_binlib_present() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/confused_by_multiple_lib_files/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn confused_by_multiple_lib_files() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn creates_binary_when_both_binlib_present() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn creates_binary_when_instructed_and_has_lib_file() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn creates_library_when_instructed_and_has_bin_file() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/explicit_bin_with_git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn explicit_bin_with_git() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/formats_source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::{process, Project};
use cargo_test_support::curr_dir;

#[cargo_test]
fn formats_source() {
fn case() {
// This cannot use `requires_rustfmt` because rustfmt is not available in
// the rust-lang/rust environment. Additionally, if running cargo without
// rustup (but with rustup installed), this test also fails due to HOME
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/fossil_autodetect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn fossil_autodetect() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/git_autodetect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::fs;
use cargo_test_support::curr_dir;

#[cargo_test]
fn git_autodetect() {
fn case() {
let project_root = &paths::root().join("foo");
// Need to create `.git` dir manually because it cannot be tracked under a git repo
fs::create_dir_all(project_root.join(".git")).unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn git_ignore_exists_no_conflicting_entries() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn ignores_failure_to_format_source() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/inferred_bin_with_git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn inferred_bin_with_git() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/inferred_lib_with_git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn inferred_lib_with_git() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/invalid_dir_name/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::fs;
use cargo_test_support::curr_dir;

#[cargo_test]
fn invalid_dir_name() {
fn case() {
let foo = &paths::root().join("foo.bar");
fs::create_dir_all(foo).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/lib_already_exists_nosrc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn lib_already_exists_nosrc() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/lib_already_exists_src/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn lib_already_exists_src() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/mercurial_autodetect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn mercurial_autodetect() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/multibin_project_name_clash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn multibin_project_name_clash() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/no_filename/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::curr_dir;

#[cfg(not(windows))]
#[cargo_test]
fn no_filename() {
fn case() {
snapbox::cmd::Command::cargo_ui()
.arg_line("init /")
.current_dir(paths::root())
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/path_contains_separator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::{t, Project};
use cargo_test_support::curr_dir;

#[cargo_test]
fn path_contains_separator() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root().join("test:ing");

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/pijul_autodetect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn pijul_autodetect() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/reserved_name/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::fs;
use cargo_test_support::curr_dir;

#[cargo_test]
fn reserved_name() {
fn case() {
let project_root = &paths::root().join("test");
fs::create_dir_all(project_root).unwrap();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_bin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn simple_bin() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_git/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn simple_git() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_git_ignore_exists/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn simple_git_ignore_exists() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_hg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test(requires_hg)]
fn simple_hg() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_hg_ignore_exists/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn simple_hg_ignore_exists() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/simple_lib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn simple_lib() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/unknown_flags/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cargo_test_support::prelude::*;
use cargo_test_support::curr_dir;

#[cargo_test]
fn unknown_flags() {
fn case() {
snapbox::cmd::Command::cargo_ui()
.arg_line("init foo --flag")
.current_dir(paths::root())
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/init/with_argument/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use cargo_test_support::Project;
use cargo_test_support::curr_dir;

#[cargo_test]
fn with_argument() {
fn case() {
let project = Project::from_template(curr_dir!().join("in"));
let project_root = &project.root();

Expand Down

0 comments on commit 41cd166

Please sign in to comment.