Skip to content

Commit

Permalink
Merge branch 'feature/support-windows-tests' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
FloGa committed Apr 7, 2024
2 parents d4cc9bf + b3b89db commit 08989fd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
test-args: -- --include-ignored

call-release-workflow:
uses: FloGa/rust-workflows/.github/workflows/release.yml@0.4.0
uses: FloGa/rust-workflows/.github/workflows/release.yml@0.5.0
with:
targets-config: ./.github/targets.json
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_existing_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ on:

jobs:
call-release-exisiting-workflow:
uses: FloGa/rust-workflows/.github/workflows/release_existing_tags.yml@0.2.0
uses: FloGa/rust-workflows/.github/workflows/release_existing_tags.yml@0.5.0
with:
targets-config: ./.github/targets.json
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ on:

jobs:
call-test-workflow:
uses: FloGa/rust-workflows/.github/workflows/test.yml@0.3.0
uses: FloGa/rust-workflows/.github/workflows/test.yml@0.5.0
with:
run-check: true
run-clippy: true
run-fmt: true
test-args: --workspace ${{ inputs.test-args }}
test-on-linux: true
test-on-macos: true
test-on-windows: true
33 changes: 21 additions & 12 deletions tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,33 @@ fn correct_version() {

#[test]
fn empty_csv_input_passes() {
Command::new(&*BIN_PATH).arg("-1Ff-").assert().success();
let mut command = Command::new(&*BIN_PATH);
command.arg("-1f-");

#[cfg(unix)]
command.arg("-F");

command.assert().success();
}

#[test]
fn empty_json_input_fails() {
Command::new(&*BIN_PATH)
.arg("-1Ff-")
.arg("--format=json")
.assert()
.failure();
let mut command = Command::new(&*BIN_PATH);
command.arg("-1f-").arg("--format=json");

#[cfg(unix)]
command.arg("-F");

command.assert().failure();
}

#[test]
fn empty_json_array_input_passes() {
Command::new(&*BIN_PATH)
.arg("-1Ff-")
.arg("--format=json")
.write_stdin("[]")
.assert()
.success();
let mut command = Command::new(&*BIN_PATH);
command.arg("-1f-").arg("--format=json");

#[cfg(unix)]
command.arg("-F");

command.write_stdin("[]").assert().success();
}

0 comments on commit 08989fd

Please sign in to comment.