summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Politz <politza@hochschule-trier.de>2015-04-09 08:44:51 +0200
committerAndreas Politz <politza@hochschule-trier.de>2015-04-09 09:13:09 +0200
commit3b83106d995fbc6acce89c6dc9b2dbba185712c1 (patch)
tree6e2556d5f7a3dac23eef1508a75ed6c51c0248c5
parent83b837e5b51ad92a29ee0f1b2acba915417a920a (diff)
Added pdf-view tests.
-rw-r--r--test/pdf-view.ert19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/pdf-view.ert b/test/pdf-view.ert
new file mode 100644
index 0000000..58f6be5
--- /dev/null
+++ b/test/pdf-view.ert
@@ -0,0 +1,19 @@
+;; -*- lexical-binding: t -*-
+
+(require 'pdf-view)
+(require 'ert)
+
+(ert-deftest pdf-view-handle-archived-file ()
+ :expected-result :failed
+ (skip-unless (executable-find "gzip"))
+ (let ((tramp-verbose 0)
+ (temp
+ (make-temp-file "pdf-test")))
+ (unwind-protect
+ (progn
+ (copy-file "test.pdf" temp t)
+ (call-process "gzip" nil nil nil temp)
+ (setq temp (concat temp ".gz"))
+ (should (numberp (pdf-info-number-of-pages temp)))))
+ (when (file-exists-p temp)
+ (delete-file temp))))