Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
2,667 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
(When "^I press \"\\(.+\\)\"$" | ||
(lambda (keybinding) | ||
(let ((macro (edmacro-parse-keys keybinding))) | ||
(if espuds-chain-active | ||
(setq espuds-action-chain (vconcat espuds-action-chain macro)) | ||
(if (and (equal keybinding "C-g") | ||
(eq (key-binding (kbd "C-g")) 'keyboard-quit)) | ||
(espuds-quit) | ||
(execute-kbd-macro macro)))))) | ||
|
||
(When "^I go to character \"\\(.+\\)\"$" | ||
(lambda (char) | ||
(goto-char (point-min)) | ||
(let ((search (re-search-forward (format "%s" char) nil t)) | ||
(message "Can not go to character '%s' since it does not exist in the current buffer: %s")) | ||
(assert search nil message char (espuds-buffer-contents))))) | ||
|
||
(When "^I go to the \\(front\\|end\\) of the word \"\\(.+\\)\"$" | ||
(lambda (pos word) | ||
(goto-char (point-min)) | ||
(let ((search (re-search-forward (format "%s" word) nil t)) | ||
(message "Can not go to character '%s' since it does not exist in the current buffer: %s")) | ||
(assert search nil message word (espuds-buffer-contents)) | ||
(if (string-equal "front" pos) (backward-word))))) | ||
|
||
(When "^I select the last \"\\(.+\\)\"$" | ||
(lambda (text) | ||
(goto-char (point-max)) | ||
(let ((search (re-search-backward text nil t))) | ||
(assert search nil "The text '%s' was not found in the current buffer." text)) | ||
(set-mark (point)) | ||
(re-search-forward text))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(let* ((current-directory (file-name-directory load-file-name)) | ||
(features-directory (expand-file-name ".." current-directory)) | ||
(project-directory (expand-file-name ".." features-directory))) | ||
(setq multifiles-root-path project-directory) | ||
(setq multifiles-util-path (expand-file-name "util" project-directory))) | ||
|
||
(add-to-list 'load-path multifiles-root-path) | ||
(add-to-list 'load-path multifiles-util-path) | ||
(add-to-list 'load-path (expand-file-name "espuds" multifiles-util-path)) | ||
|
||
(require 'multiple-cursors) | ||
(require 'espuds) | ||
(require 'ert) | ||
|
||
(Before | ||
(switch-to-buffer | ||
(get-buffer-create "*multifiles-test*")) | ||
(erase-buffer) | ||
(transient-mark-mode 1) | ||
(cua-mode 0) | ||
(delete-selection-mode 0) | ||
(subword-mode 0) | ||
(setq set-mark-default-inactive nil) | ||
(deactivate-mark)) | ||
|
||
(After) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
ENV["WATCHR"] = "1" | ||
system 'clear' | ||
|
||
def run(cmd) | ||
`#{cmd}` | ||
end | ||
|
||
def run_all_tests | ||
system('clear') | ||
result = run "./util/ecukes/ecukes --graphical" | ||
puts result | ||
end | ||
|
||
def run_test(file) | ||
system('clear') | ||
result = run "./util/ecukes/ecukes --graphical #{file}" | ||
puts result | ||
end | ||
|
||
run_all_tests | ||
watch('.*.feature') { |file| run_test file } | ||
watch('.*.el') { run_all_tests } | ||
|
||
# Ctrl-\ | ||
Signal.trap 'QUIT' do | ||
puts " --- Running all tests ---\n\n" | ||
run_all_tests | ||
end | ||
|
||
@interrupted = false | ||
|
||
# Ctrl-C | ||
Signal.trap 'INT' do | ||
if @interrupted then | ||
@wants_to_quit = true | ||
abort("\n") | ||
else | ||
puts "Interrupt a second time to quit" | ||
@interrupted = true | ||
Kernel.sleep 1.5 | ||
# raise Interrupt, nil # let the run loop catch it | ||
run_all_tests | ||
@interrupted = false | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
cd "$(dirname "$0")" | ||
|
||
set_default () { | ||
eval " | ||
if [ -z \$$1 ]; then | ||
$1=$2 | ||
fi | ||
" | ||
} | ||
|
||
set_default ECUKES_EMACS "$(which emacs)" | ||
|
||
echo "*** Emacs version ***" | ||
echo "ECUKES_EMACS =" $(which $ECUKES_EMACS) | ||
$ECUKES_EMACS --version | ||
echo | ||
|
||
exec ./util/ecukes/ecukes --graphical |
Oops, something went wrong.