Skip to content

Commit aad837a

Browse files
committed
Test command refresh
1 parent c5210c4 commit aad837a

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

test/exit-status/refresh/bad/Eask

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(package "lint"
2+
"0.0.1"
3+
"Test project for lint")
4+
(package-file "lint-pkg.el")
5+
6+
(source 'gnu)
7+
(source 'melpa)
8+
(source 'foobar)

test/exit-status/refresh/good/Eask

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(package "lint"
2+
"0.0.1"
3+
"Test project for lint")
4+
(package-file "lint-pkg.el")
5+
6+
(source 'gnu)
7+
(source 'melpa)

test/exit-status/refresh/run.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2022-2024 the Eask authors.
4+
5+
# This program is free software; you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation; either version 3, or (at your option)
8+
# any later version.
9+
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
18+
## Commentary:
19+
#
20+
# Test command `refresh`
21+
#
22+
23+
set -e
24+
25+
source ./test/fixtures/home/scripts/testing.sh
26+
cd $(dirname "$0")
27+
28+
cd ./good/
29+
should_run eask refresh
30+
cd ../
31+
32+
cd ./bad/
33+
should_error eask refresh
34+
OUTPUT="$(should_error eask refresh --allow-error)"
35+
echo "$OUTPUT"
36+
should_match "Downloading gnu" "$OUTPUT"

0 commit comments

Comments
 (0)