Skip to content

Commit 63e76cc

Browse files
committed
Add a test for aria2c
1 parent b3ba8c8 commit 63e76cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: test/fetch.bats

+15
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
load test_helper
44
export RUBY_BUILD_SKIP_MIRROR=1
55
export RUBY_BUILD_CACHE_PATH=
6+
export RUBY_BUILD_ARIA2_OPTS=
67

78
setup() {
89
ensure_not_found_in_path aria2c
@@ -19,6 +20,20 @@ setup() {
1920
assert_output_contains "error: failed to download package-1.0.0.tar.gz"
2021
}
2122

23+
@test "using aria2c if available" {
24+
stub aria2c "* -o * http://example.com/* : cp $FIXTURE_ROOT/\${4##*/} \$3"
25+
26+
install_fixture definitions/without-checksum
27+
assert_success
28+
assert_output <<OUT
29+
Downloading package-1.0.0.tar.gz...
30+
-> http://example.com/packages/package-1.0.0.tar.gz
31+
Installing package-1.0.0...
32+
Installed package-1.0.0 to ${TMP}/install
33+
OUT
34+
unstub aria2c
35+
}
36+
2237
@test "fetching from git repository" {
2338
stub git "clone --depth 1 --branch master http://example.com/packages/package.git package-dev : mkdir package-dev"
2439

0 commit comments

Comments
 (0)