#!/bin/bash source tests/test_helper.sh TEST_ARB=$TEST_ARGS maketmpdir T cp $TEST_ARB $T/ref.arb SINA="./src/sina" begin_test "PREP" capture_stdouterr "$SINA -i $T/ref.arb -o $T/extracted.fasta --select-step 1000 --prealigned" assert_exit_success assert_output_contains "align 12 sequences" capture_stdouterr "$SINA -i $T/ref.arb -o $T/extracted.arb --select-step 1000 --prealigned" assert_exit_success assert_output_contains "align 12 sequences" end_test begin_test "Search" capture_stdouterr "$SINA -i $T/extracted.fasta -o $T/results.fasta --db $T/ref.arb --prealigned --search -v" assert_output_count "nearest_slv: \w" -eq 12 end_test begin_test "Search - add relatives" capture_stdouterr "$SINA -i $T/extracted.fasta -o $T/results.fasta --db $T/ref.arb --prealigned --search -v --add-relatives 2" assert_output_count "nearest_slv: \w" -eq 12 assert_output_contains "24 relatives" end_test