Robot Name in Emacs Lisp

Manage robot factory settings.

robot-name-test.el

;;; robot-name-test.el --- Tests for Robot Name (exercism);;; Commentary:;; Ported pretty much directly from the xlisp version :);;; Code:(require'rx)(load-file"robot-name.el")(defvar*robbie*(build-robot))(defvar*clutz*(build-robot))(defvarrobot-name-re(rxstring-start(=2upper-case)(=3digit)string-end))(ert-deftestname-matches-expected-pattern()(let((name(robot-name*robbie*)))(should(string-match-probot-name-rename))))(ert-deftestname-is-persistent()"Test that robot name is persistent."(should(equal(robot-name*robbie*)(robot-name*robbie*))))(ert-deftestdifferent-robots-have-different-names()(should-not(equal(robot-name*robbie*)(robot-name*clutz*))))(ert-deftestname-can-be-reset()(let*((robot(build-robot))(original-name(robot-namerobot)))(reset-robotrobot)(should-not(equaloriginal-name(robot-namerobot)))))(provide'robot-name-test);;; robot-name-test.el ends here