Skip to content

Instantly share code, notes, and snippets.

@syohex
Created January 10, 2012 15:39
Show Gist options
  • Save syohex/1589679 to your computer and use it in GitHub Desktop.
Save syohex/1589679 to your computer and use it in GitHub Desktop.
sample of el-test-more
syohei@gretsch:% prove -v --exec='emacs -Q --script' sample.el
sample.el ..
1..3
ok 1 - string type test
ok 2 - add test
ok 3 - matching test test
ok
All tests successful.
Files=1, Tests=3, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.04 cusr 0.00 csys = 0.05 CPU)
Result: PASS
(add-to-list 'load-path ".")
(require 'test-more)
(test-more:import)
(plan 3)
(ok (typep "test-more" 'string) "string type test")
(is (+ 1 1) 2 "add test")
(like "987" "^[0-9]+$" "matching test test")
(finalize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment