forked from ruricolist/cmd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.lisp
More file actions
27 lines (23 loc) · 741 Bytes
/
Copy pathtest.lisp
File metadata and controls
27 lines (23 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(defpackage :cmd/test
(:use :cl :cmd/cmd :fiveam :alexandria :serapeum)
(:export :run-tests))
(in-package :cmd/test)
(def-suite cmd)
(in-suite cmd)
(defun run-tests ()
(run! 'cmd))
(test filename-starts-with-dash
(signals error
(eval '(cmd "ls" #p"-file"))))
(test unix-cmd
(if (uiop:os-unix-p)
(progn
(is (equal* "hello"
($cmd "echo hello")
($cmd '("echo" "hello"))
($cmd "echo" #p"hello")
($cmd '("echo" #p "hello"))))
(let ((file (asdf:system-relative-pathname :cmd "test/literal.txt")))
(is (equal (chomp (read-file-into-string file))
($cmd "cat" file)))))
(skip "Not on Unix")))