• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jtmoulia/elisp-koans: Emacs Lisp Koans -- learn elisp through test-driven develo ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jtmoulia/elisp-koans

开源软件地址:

https://github.com/jtmoulia/elisp-koans

开源编程语言:

Emacs Lisp 100.0%

开源软件介绍:

elisp-koans

What is elisp-koans?

elisp-koans helps you learn Emacs Lisp (elisp) via test-driven development. You’re provided with suites of tests describing the elisp syntax and environment. Fixing the tests leads you on a tutorial of elisp.

These koans are intended for those learning to code in Emacs Lisp and

plus be able to call interactive functions, evaluate code in the buffer, and look up documentation.

Usage

Create a clone of this repository:

git clone https://github.com/jtmoulia/elisp-koans

First load elisp-koans.el by opening it in Emacs then running the interactive command eval-buffer.

Next open up koans/asserts.el and navigate to the first test:

(elisp-koans/deftest
 elisp-koans/asserts-true ()
 "`t' is true. Replace the blank with `t' to assert it is true"
 (should ___))

Fix the test by replacing the blank (___) with the appropriate value, in this case t as described in the docstring:

(should t)

Once the test is fixed evaluate the test and then run it by calling elisp-koans/run-test and selecting the test: elisp-koans/asserts-true. ERT will run the test and report the result.

You’re ready to move on to the remaining koans in koans/asserts.el and beyond. The variable elisp-koans-groups lists the remaining suites of koans which are ordered to provide a tour of Emacs Lisp. As you progress run all of the loaded koans by calling elisp-koans/contemplate, or a single test by calling elisp-koans/run-test.

The Cheatsheet

You can check your answers against the cheatsheet, i.e. a branch called cheatsheet which has the koan solutions filled in. This branch is kept up to date by staying one commit ahead of master

Credits

elisp-koans is adapted from Google’s Common Lisp Koans, which was in turn inspired by the family of TDD Koans, e.g. Ruby Koans and Python Koans.

License

The Common Lisp Koan’s were modified under the terms of the Apache License.

elisp-koans uses the Apache License.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap