-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
gargs_race | ||
binaries | ||
ssshtest | ||
gargs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: go | ||
|
||
os: | ||
- linux | ||
- osx | ||
|
||
go: | ||
- 1.4 | ||
- 1.5 | ||
- 1.6 | ||
|
||
script: | ||
- ./tests/functional-test.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
test -e ssshtest || wget -q https://raw.githubusercontent.com/ryanlayer/ssshtest/master/ssshtest | ||
|
||
. ssshtest | ||
|
||
go build -o gargs_race -race -a | ||
|
||
fn_check_basic() { | ||
seq 12 -1 1 | ./gargs_race -p 5 -n 3 -d -v 'sleep {0}; echo {1} {2}' | ||
} | ||
run check_basic fn_check_basic | ||
assert_exit_code 0 | ||
assert_in_stderr 'command:' | ||
assert_equal 4 $(wc -l $STDOUT_FILE) | ||
assert_equal 4 $(grep -c sleep $STDOUT_FILE) | ||
|
||
fn_check_sep() { | ||
cat tests/t.txt | ./gargs_race --sep "\s+" -p 2 "echo -e '{0}:{1}-{2}' full-line: \'{}\'" | ||
} | ||
run check_sep fn_check_sep | ||
assert_exit_code 0 | ||
assert_in_stdout "chr2:22-33 full-line: 'chr2 22 33'" | ||
assert_in_stdout "chr1:22-33 full-line: 'chr1 22 33'" | ||
assert_in_stdout "chr3:22-33 full-line: 'chr3 22 33'" | ||
assert_in_stdout "chr4:22-33 full-line: 'chr4 22 33'" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
chr1 22 33 | ||
chr2 22 33 | ||
chr3 22 33 | ||
chr4 22 33 |