Skip to content

Commit 7348a31

Browse files
committed
Test uninstall command
1 parent aad837a commit 7348a31

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

test/exit-status/uninstall/Eask

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(package "check-clean" "0.0.1" "mock package")
2+
3+
(package-file "lint.el")
4+
5+
(source 'gnu)
6+
7+
(development
8+
(depends-on "ert")
9+
(depends-on "dash"))
10+
;; (depends-on "not-a-package")

test/exit-status/uninstall/lint.el

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
;;; lint.el --- Test the command package -*- lexical-binding: t; -*-
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 of the License, or
8+
;; (at your option) 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+
;;; Version: 0.0.1
19+
20+
;;; Commentary:
21+
22+
;;; Code:
23+
24+
(declare-function ignore "subr.el" (&rest args))
25+
26+
(provide 'lint)
27+
28+
;;; lint.el ends here

test/exit-status/uninstall/run.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
# Tests "uninstall" command
21+
22+
set -e
23+
24+
source ./test/fixtures/home/scripts/testing.sh
25+
cd $(dirname "$0")
26+
27+
# FIXME
28+
# unclear what should happen here
29+
# message seems to suggest that the package-file will be uninstalled
30+
# but this does not work, e.g. eask install -> eask uninstall does not undo
31+
# should_error eask uninstall
32+
33+
# TODO what if package file is specified
34+
35+
# Uninstall a package that isn't installed
36+
should_run eask uninstall s
37+
38+
# Uninstall a built-in package
39+
# FIXME huge stack trace
40+
should_error eask uninstall ert
41+
42+
# seems like neither --strict or --allow-error has any effect
43+
# there are eask warnings but strict does not effect them
44+
should_run eask uninstall --strict s

0 commit comments

Comments
 (0)