Skip to content

Commit

Permalink
Integrate integration tests in a single binary
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Mar 7, 2024
1 parent 3cb9934 commit 2739a20
Show file tree
Hide file tree
Showing 111 changed files with 187 additions and 195 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions tests/test_glob.rs → tests/integration/glob.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![cfg(feature = "glob")]

mod glob_submodule;

#[test]
fn test_basic_globbing() {
insta::glob!("inputs/*.txt", |path| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn test_globs_follow_links_parent_dir_glob() {
#[test]
fn test_basic_globbing_absolute_dir() {
insta::glob!(
concat!(env!("CARGO_MANIFEST_DIR"), "/tests/inputs"),
concat!(env!("CARGO_MANIFEST_DIR"), "/tests/integration/inputs"),
"*.txt",
|path| {
let contents = std::fs::read_to_string(path).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion [email protected][email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/glob_submodule/mod.rs
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/inputs/goodbye.txt
---
Expand Down
2 changes: 1 addition & 1 deletion [email protected][email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/glob_submodule/mod.rs
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/inputs/hello.txt
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs-nested/a/file.txt
---
Hello A
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs-nested/b/file.txt
---
Hello B
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs-nested/a/file.txt
---
Hello A
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs-nested/b/file.txt
---
Hello B
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs/goodbye.txt
---
"Contents of goodbye"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs/hello.txt
---
"Contents of hello"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs/goodbye.txt
---
"Contents of goodbye"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs/hello.txt
---
"Contents of hello"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs/goodbye.txt
---
"Contents of goodbye"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob_submodule/mod.rs
expression: "&contents"
input_file: tests/integration/inputs/hello.txt
---
"Contents of hello"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions tests/integration/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mod allow_duplicates;
mod basic;
mod bugs;
mod filters;
mod glob;
mod glob_submodule;
mod inline;
mod redaction;
mod settings;
mod suffixes;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_settings.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: td
---
TestDisplay struct
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: m
---
? - 1
Expand All @@ -17,4 +17,3 @@ expression: m
? - 9
- 3
: 4

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "\"aoeu\""
---
aoeu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3, 4]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3, 4, 5]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "\"whatever\""
---
whatever
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: td
---
TestDisplay struct
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3, 4]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3, 4, 5]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3]"
---
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3, 4]"
---
- 1
- 2
- 3
- 4

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3, 4, 5]"
---
- 1
- 2
- 3
- 4
- 5

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3]"
---
- 1
- 2
- 3

Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
source: tests/test_basic.rs
source: tests/integration/basic.rs
expression: "vec![1, 2, 3]"
---
- 1
- 2
- 3

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_bugs.rs
source: tests/integration/bugs.rs
expression: "\"foo\\r\\nbar\\r\\nbaz\""
---
foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
source: tests/test_bugs.rs
source: tests/integration/bugs.rs
expression: "\"foo\\r\\nbar\\r\\nbaz\\r\\n\""
---
foo
bar
baz

6 changes: 6 additions & 0 deletions tests/integration/snapshots/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob.rs
expression: "&contents"
input_file: tests/integration/inputs/goodbye.txt
---
"Contents of goodbye"
6 changes: 6 additions & 0 deletions tests/integration/snapshots/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob.rs
expression: "&contents"
input_file: tests/integration/inputs/hello.txt
---
"Contents of hello"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob.rs
expression: "&contents"
input_file: tests/integration/inputs-nested/a/file.txt
---
Hello A
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob.rs
expression: "&contents"
input_file: tests/integration/inputs-nested/b/file.txt
---
Hello B
6 changes: 6 additions & 0 deletions tests/integration/snapshots/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob.rs
expression: "&contents"
input_file: tests/integration/inputs/goodbye.txt
---
"Contents of goodbye"
6 changes: 6 additions & 0 deletions tests/integration/snapshots/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
source: tests/integration/glob.rs
expression: "&contents"
input_file: tests/integration/inputs/hello.txt
---
"Contents of hello"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: tests/test_inline.rs
source: tests/integration/inline.rs
expression: "\"Testing-2\""
---
Testing-2
Loading

0 comments on commit 2739a20

Please sign in to comment.