Más contenido relacionado
Similar a 131026 kansai-emacs (9)
Más de Yuki Shibazaki (10)
131026 kansai-emacs
- 8. PerlでTest::Classのメソッド単位で実行する
(defun run-perl-method-test ()
(interactive)
(let (
(command compile-command)
(test-method nil))
(save-excursion
(when (or
(re-search-backward "bsubs+([_[:alpha:]]+)s*:s*Test" nil t)
(re-search-forward "bsubs+([_[:alpha:]]+)s*:s*Test" nil t))
(setq test-method (match-string 1))))
(if test-method
(compile
(format
"cd %s; TEST_METHOD=%s perl -M'Project::Libs lib_dirs => [qw(modules/*/lib
local/lib/perl5)]' %s"
(replace-regexp-in-string
"n+$" ""
(shell-command-to-string "git rev-parse --show-cdup"))
test-method
(buffer-file-name (current-buffer))))
(compile
(format
"cd %s; perl -M'Project::Libs lib_dirs => [qw(modules/*/lib local/lib/
perl5)]' %s"
(replace-regexp-in-string
"n+$" "" (shell-command-to-string "git rev-parse --show-cdup"))
(buffer-file-name (current-buffer)))))))