Skip to content

Commit

Permalink
Small fixes and test runner for MS Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bmag committed Oct 2, 2016
1 parent 7fa3e72 commit e18c801
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions cask-test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
type NUL > tests\user-input.txt
cask exec emacs -batch -L . -L tests -l buttercup -f buttercup-run-discover < tests\user-input.txt
6 changes: 3 additions & 3 deletions tests/buttercup-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ Gotcha: this will not work when buttercup spies on `insert-file-contents'."
;; throws error if invalid input
(validate-user-input line)
(setq input-lines-inserted (1+ input-lines-inserted))
(shell-command (format "echo %s >> %s" line user-input-filename)))
(shell-command (format "echo %s>> %s" line user-input-filename)))

;;; save/load purpose configurations
(defun get-purpose-config ()
(seq-map (lambda (var)
(cons var (eval var)))
'(purpose-user-mode-purposes
purpose-user-name-purposes
'(purpose-user-name-purposes
purpose-user-regexp-purposes
purpose-user-mode-purposes
purpose-extended-configuration
purpose-use-default-configuration)))

Expand Down
4 changes: 2 additions & 2 deletions tests/test-core.el
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
;; -*- lexical-binding: t -*-
(require 'buttercup-init)

(defvar test-purpose-config
(defvar test-core-purpose-config
`((purpose-user-name-purposes . (("FOO" . USER1)))
(purpose-user-regexp-purposes . (("^FOO2\\'" . USER2)))
(purpose-user-mode-purposes . ((text-mode . USER3)))
Expand All @@ -24,7 +24,7 @@

(before-each
(setq config-case-snapshot (get-purpose-config))
(load-purpose-config test-purpose-config)
(load-purpose-config test-core-purpose-config)
(create-buffers "FOO" "FOO2" "FOO3"
"BAR" "BAR2" "BAR3"
".gitignore" " *Minibuf-777*" "TUX"
Expand Down

0 comments on commit e18c801

Please sign in to comment.