diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-11-21 07:22:08 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-11-21 07:22:08 -0500 |
commit | 9ebec329bf25548f21401f7e3690012845348d29 (patch) | |
tree | 08f1f9a944c34453e3de69870261c3d441f6c74e /exercism/emacs-lisp/hello-world | |
parent | fe12fe16fa5f8bddece8cab225a9bc4a332cfffd (diff) |
exercism elisp exercises
Diffstat (limited to 'exercism/emacs-lisp/hello-world')
-rw-r--r-- | exercism/emacs-lisp/hello-world/.exercism/config.json | 25 | ||||
-rw-r--r-- | exercism/emacs-lisp/hello-world/.exercism/metadata.json | 1 | ||||
-rw-r--r-- | exercism/emacs-lisp/hello-world/HELP.md | 41 | ||||
-rw-r--r-- | exercism/emacs-lisp/hello-world/README.md | 37 | ||||
-rw-r--r-- | exercism/emacs-lisp/hello-world/hello-world-test.el | 15 | ||||
-rw-r--r-- | exercism/emacs-lisp/hello-world/hello-world.el | 4 |
6 files changed, 123 insertions, 0 deletions
diff --git a/exercism/emacs-lisp/hello-world/.exercism/config.json b/exercism/emacs-lisp/hello-world/.exercism/config.json new file mode 100644 index 0000000..683e6a2 --- /dev/null +++ b/exercism/emacs-lisp/hello-world/.exercism/config.json @@ -0,0 +1,25 @@ +{ + "blurb": "The classical introductory exercise. Just say \"Hello, World!\"", + "authors": [ + "canweriotnow" + ], + "contributors": [ + "benreyn", + "konrad", + "kytrinyx", + "vermiculus" + ], + "files": { + "solution": [ + "hello-world.el" + ], + "test": [ + "hello-world-test.el" + ], + "example": [ + ".meta/example.el" + ] + }, + "source": "This is an exercise to introduce users to using Exercism", + "source_url": "http://en.wikipedia.org/wiki/%22Hello,_world!%22_program" +} diff --git a/exercism/emacs-lisp/hello-world/.exercism/metadata.json b/exercism/emacs-lisp/hello-world/.exercism/metadata.json new file mode 100644 index 0000000..8c77a7c --- /dev/null +++ b/exercism/emacs-lisp/hello-world/.exercism/metadata.json @@ -0,0 +1 @@ +{"track":"emacs-lisp","exercise":"hello-world","id":"dda6cfc056f94482ac16f4bbcfca0b9c","url":"https://exercism.org/tracks/emacs-lisp/exercises/hello-world","handle":"orbekk","is_requester":true,"auto_approve":false}
\ No newline at end of file diff --git a/exercism/emacs-lisp/hello-world/HELP.md b/exercism/emacs-lisp/hello-world/HELP.md new file mode 100644 index 0000000..8af8f70 --- /dev/null +++ b/exercism/emacs-lisp/hello-world/HELP.md @@ -0,0 +1,41 @@ +# Help + +## Running the tests + +Tests can be run several ways: + +1. Interactively and individually, with `M-x ert RET test-name RET` +2. Interactively and all at once, with `M-x ert RET t RET` +3. From the terminal, in batch mode, with `emacs -batch -l ert -l my-test.el -f ert-run-tests-batch-and-exit` +4. Other options can be found in the docs, `C-h i m ert RET` + +## Submitting your solution + +You can submit your solution using the `exercism submit hello-world.el` command. +This command will upload your solution to the Exercism website and print the solution page's URL. + +It's possible to submit an incomplete solution which allows you to: + +- See how others have completed the exercise +- Request help from a mentor + +## Need to get help? + +If you'd like help solving the exercise, check the following pages: + +- The [Emacs Lisp track's documentation](https://exercism.org/docs/tracks/emacs-lisp) +- [Exercism's support channel on gitter](https://gitter.im/exercism/support) +- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs) + +Should those resources not suffice, you could submit your (incomplete) solution to request mentoring. + +To get help if you're having trouble, you can use one of the following resources: + +- [The Emacs Wiki](http://emacswiki.org/) is invaluable. Spend lots of time here. +- [The Emacs Editor](http://www.gnu.org/software/emacs/manual/html_node/emacs/index.html) is the official manual for GNU Emacs. +- IRC - there are [freenode](https://freenode.net/) channels for `#emacs`, `#prelude`, and many Emacs + packages, and many helpful folks around. And with emacs, IRC is as close as + `M-x erc`. +- [Exercism Support](https://gitter.im/exercism/support) Gitter chat is also a good place to get help from the + exercism community. +- [StackOverflow](http://stackoverflow.com/questions/tagged/elisp) can be used to search for your problem and see if it has been answered already. You can also ask and answer questions.
\ No newline at end of file diff --git a/exercism/emacs-lisp/hello-world/README.md b/exercism/emacs-lisp/hello-world/README.md new file mode 100644 index 0000000..be8ab4f --- /dev/null +++ b/exercism/emacs-lisp/hello-world/README.md @@ -0,0 +1,37 @@ +# Hello World + +Welcome to Hello World on Exercism's Emacs Lisp Track. +If you need help running the tests or submitting your code, check out `HELP.md`. + +## Instructions + +The classical introductory exercise. Just say "Hello, World!". + +["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is +the traditional first program for beginning programming in a new language +or environment. + +The objectives are simple: + +- Write a function that returns the string "Hello, World!". +- Run the test suite and make sure that it succeeds. +- Submit your solution and check it at the website. + +If everything goes well, you will be ready to fetch your first real exercise. + +## Source + +### Created by + +- @canweriotnow + +### Contributed to by + +- @benreyn +- @konrad +- @kytrinyx +- @vermiculus + +### Based on + +This is an exercise to introduce users to using Exercism - http://en.wikipedia.org/wiki/%22Hello,_world!%22_program
\ No newline at end of file diff --git a/exercism/emacs-lisp/hello-world/hello-world-test.el b/exercism/emacs-lisp/hello-world/hello-world-test.el new file mode 100644 index 0000000..f5f6ce0 --- /dev/null +++ b/exercism/emacs-lisp/hello-world/hello-world-test.el @@ -0,0 +1,15 @@ +;;; hello-world-test.el --- Tests for Hello World (exercism) + +;;; Commentary: +;; Common test data version: 1.1.0 be3ae66 + +;;; Code: + +(load-file "hello-world.el") + +(ert-deftest hello-world-test () + (should (string= (hello) "Hello, World!"))) + +(provide 'hello-world-test) + +;;; hello-world-test.el ends here diff --git a/exercism/emacs-lisp/hello-world/hello-world.el b/exercism/emacs-lisp/hello-world/hello-world.el new file mode 100644 index 0000000..6f0dd39 --- /dev/null +++ b/exercism/emacs-lisp/hello-world/hello-world.el @@ -0,0 +1,4 @@ +(defun hello () + "Hello, World!") + +(provide 'hello-world) |