nyuhuhuu

Archive for 2010. március|Monthly archive page

Unit testing Emacs Lisp code with ElUnit

In Napló bejegyzések on 2010.03.17. at 16.02

ElUnit is a unit test framework for Emacs Lisp. You can define your test suites and see how they run against your code. It’s a great toolkit for test-driven development in Emacs Lisp as well. Running your tests manually after each changes may make you bored, though. Fortunately, you are using an extensible editor. In my scenario, I taught Emacs to automatically run corresponding test suites whenever I save the file I’m editing. As for the file topology, I put my tests under sub-directory tests/, and call them in scheme my-file-test.el. On the very beginning of each code file, I place a magic comment to specify file variable elunit-default-suite that holds the name of the test suite I want to run.

;; -*- elunit-default-suite: "my-demo-suite" -*-

The following snippet does the rest of the job: my_elunit.el

Bringával, mert

In Napló bejegyzések on 2010.03.08. at 13.08

Persze hát gyalog amíg a buszig kétszer hogy aztán a buszon meg metrón a hőségtől fulladva a bringán két kör után a hátadra a póló hogy a kocsiban a dugóban a betonok közt nyűglődve és éjjel amikor az ablakot tárva hogy a hűs szelő átjárja a szoknyád az arcodba csap a terhes langy csak. Szerintem is legyen már nyár, baszd meg!

Follow

Get every new post delivered to your Inbox.