Skip to content

Commit

Permalink
[TEST] Add cli test for delete.
Browse files Browse the repository at this point in the history
  • Loading branch information
MitraDarja committed Aug 17, 2023
1 parent b54a646 commit fb32036
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ target_use_datasources (estimate_options_test FILES IBF_1 mini_gen.fasta)
add_cli_test (count_options_test.cpp)
target_use_datasources (count_options_test FILES mini_example.fasta mini_gen.fasta mini_gen.genome)
add_cli_test (delete_options_test.cpp)
target_use_datasources (delete_options_test FILES exp_01.fasta)
17 changes: 17 additions & 0 deletions test/cli/delete_options_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,20 @@ TEST_F(delete_options_test, delete_no_options)
EXPECT_EQ(result.out, expected);
EXPECT_EQ(result.err, std::string{});
}

TEST_F(delete_options_test, with_argument)
{
estimate_ibf_arguments ibf_args{};
minimiser_arguments minimiser_args{};
ibf_args.expression_thresholds = {1, 2};
std::vector<double> fpr = {0.05};
std::vector<std::filesystem::path> sequence_files = {data("exp_01.fasta"),data("exp_01.fasta")};
ibf_args.path_out = "Test_";
std::vector<uint8_t> cutoffs{};
ibf(sequence_files, ibf_args, minimiser_args, fpr, cutoffs);

cli_test_result result = execute_app("needle delete -i ", "Test_ ", "0");
EXPECT_EQ(result.exit_code, 0);
EXPECT_EQ(result.out, "");
EXPECT_EQ(result.err, std::string{});
}

0 comments on commit fb32036

Please sign in to comment.