summaryrefslogtreecommitdiff
path: root/features/support/env.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2018-08-29 22:49:20 -0700
committerGitHub <noreply@github.com>2018-08-29 22:49:20 -0700
commit67339d896aa65d75272b80134a8128276c8c6a0f (patch)
tree09eb145ffcbaf89d873c89e8346ee8d38a88ebbe /features/support/env.el
parent29dd9bb233e149cae62a2277020074f8fec1eec8 (diff)
parent800dd7677276f9e425c5db37b3e31e56ab1dad32 (diff)
Merge pull request #23 from dickmao/fix-castling-legality
Add tests for castling legality and ics response handling.
Diffstat (limited to 'features/support/env.el')
-rw-r--r--features/support/env.el43
1 files changed, 43 insertions, 0 deletions
diff --git a/features/support/env.el b/features/support/env.el
new file mode 100644
index 0000000..58ed42f
--- /dev/null
+++ b/features/support/env.el
@@ -0,0 +1,43 @@
+(require 'f)
+
+(defvar emacs-chess-support-path
+ (f-dirname load-file-name))
+
+(defvar emacs-chess-features-path
+ (f-parent emacs-chess-support-path))
+
+(defvar emacs-chess-root-path
+ (f-parent emacs-chess-features-path))
+
+(add-to-list 'load-path emacs-chess-root-path)
+
+(require 'chess-ics)
+(require 'espuds)
+(require 'ert)
+(require 'cl)
+
+(Setup
+ (defvar test-display nil)
+ (defvar test-fifo nil)
+)
+
+(Before
+ ;; Before each scenario is run
+ )
+
+(After
+ ;; After each scenario is run
+ (when test-display
+ (chess-module-destroy test-display)
+ (setq test-display nil))
+ (when (process-status "*chess-ics*")
+ (delete-process "*chess-ics*"))
+ (when test-fifo
+ (process-send-eof test-fifo)
+ (delete-process test-fifo)
+ (setq test-fifo nil))
+)
+
+(Teardown
+ ;; After when everything has been run
+ )