Only running bats tests

This commit is contained in:
Alex Epstein 2018-04-15 19:33:24 -04:00
parent 36a7cf8417
commit 301be87d04
11 changed files with 1 additions and 157 deletions

View File

@ -8,7 +8,7 @@ matrix:
- os: osx
allow_failures:
- os: osx
before_install:
- sudo ./install.sh all
@ -19,8 +19,6 @@ install:
- if [ $TRAVIS_OS_NAME = linux ]; then sudo apt-get install -qq openssl; else brew install openssl; fi
- if [ $TRAVIS_OS_NAME = linux ]; then cpanm Sparrow --sudo --notest -q; fi
- if [ $TRAVIS_OS_NAME = linux ]; then sparrow index update; fi
- if [ $TRAVIS_OS_NAME = linux ]; then sparrow plg install bash-snippets-interactive-test; fi
script:
- if [ $TRAVIS_OS_NAME = linux ]; then sparrow plg run bash-snippets-interactive-test --param dir=$PWD; fi
- bats tests

View File

@ -1,21 +0,0 @@
# SYNOPSIS
Run tests against BashSnippets tools with interactive prompt.
# INSTALL
$ sparrow plg install bash-snippets-interactive-test
# USAGE
$ sparrow plg run bash-snippets-interactive-test --param dir=/path/to/bash-snippets/tools/directory
![report](https://raw.githubusercontent.com/melezhik/images/master/report.png)
# Authors
* The plugin maintainer is [Alexey Melezhik](https://github.com/melezhik/)

View File

@ -1 +0,0 @@
requires "Expect";

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
run_story 'currency/example1'
run_story 'currency/example2'

View File

@ -1,15 +0,0 @@
begin:
What is the base currency: USD
What currency to exchange to: RUB
What is the amount being exchanged: 0
end:
begin:
=========================
| USD to RUB
regexp: ^\|\s+Rate:\s+\d+\.\d+\s*$
| USD: 0
| RUB: 0
=========================
end:

View File

@ -1,44 +0,0 @@
#!/usr/bin/env perl
use Expect;
use strict;
my $tools_dir = config()->{dir};
my $exp = Expect->new;
$exp->spawn("$tools_dir/currency/currency")
or die "Cannot spawn command: bash $tools_dir/currency/currency: $!\n";
$exp->expect(120,
[
qr/What is the base currency/ => sub {
my $exp = shift;
$exp->send("USD\n");
exp_continue;
}
],
[
qr/What currency to exchange to/ => sub {
my $exp = shift;
$exp->send("RUB\n");
exp_continue;
}
],
[
qr/What is the amount being exchanged/ => sub {
my $exp = shift;
$exp->send("0\n");
exp_continue;
}
],
);
$exp->hard_close();

View File

@ -1,15 +0,0 @@
begin:
What is the base currency: USD
What currency to exchange to: RUB
What is the amount being exchanged: 100
end:
begin:
=========================
| USD to RUB
regexp: ^\|\s+Rate:\s+\d+\.\d+\s*$
| USD: 100
regexp: ^\|\s+RUB:\s+\d+\.\d+\s*$
=========================
end:

View File

@ -1,44 +0,0 @@
#!/usr/bin/env perl
use Expect;
use strict;
my $tools_dir = config()->{dir};
my $exp = Expect->new;
$exp->spawn("$tools_dir/currency/currency")
or die "Cannot spawn command: bash $tools_dir/currency/currency: $!\n";
$exp->expect(120,
[
qr/What is the base currency/ => sub {
my $exp = shift;
$exp->send("USD\n");
exp_continue;
}
],
[
qr/What currency to exchange to/ => sub {
my $exp = shift;
$exp->send("RUB\n");
exp_continue;
}
],
[
qr/What is the amount being exchanged/ => sub {
my $exp = shift;
$exp->send("100\n");
exp_continue;
}
],
);
$exp->hard_close();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

View File

@ -1,9 +0,0 @@
{
"name" : "bash-snippets-interactive-test",
"description" : "Run tests against BashSnippets tools with interactive prompt",
"version" : "0.0.2",
"url" : "https://github.com/alexanderepstein/Bash-Snippets",
"category": "utilities",
"sparrow_version" : "0.2.48",
"doc" : "README.md"
}

View File

@ -1 +0,0 @@
dir: "../"