el-get/test
yagnesh రాఘవ b6c74f7caf Merge pull request #1395 from npostavs/rmpkg-is-nil
fix test 683, removed package has no status
2013-10-06 19:11:25 -07:00
..
caching-speedtest.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
check-recipe.el Add recipe checker command and script 2013-01-05 11:56:49 +09:00
el-get-issue-176.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-200.el Disable redundant bandwidth-heavy test #200. 2012-10-07 03:50:41 -07:00
el-get-issue-284.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-289.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-303.el Fix #303 after merging #660 2012-06-03 07:53:55 -07:00
el-get-issue-310.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-400.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-407.el changed mentions of 'README.asciidoc' to 'README.md' in source files 2013-04-01 15:46:34 +03:00
el-get-issue-418.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-432.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-513.el Update emacsmirror method for github method cleanup 2012-10-06 18:13:32 -07:00
el-get-issue-535.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-541.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-548.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-559.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-579.el Fix spelling of word "package" 2012-11-02 15:32:19 +01:00
el-get-issue-581.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-583.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-586.el Fix spelling of word "package" 2012-11-02 15:32:19 +01:00
el-get-issue-589.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-592.el
el-get-issue-594.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-596.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-613.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-615.el
el-get-issue-619.el
el-get-issue-628.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-632.el
el-get-issue-640.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-642.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-650.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-652.el Use setq instead of let in tests 2012-03-18 12:33:04 -07:00
el-get-issue-656.el Always print with "print-level" and "print-length" nil 2012-03-29 14:52:43 -07:00
el-get-issue-659.el Fix test for #659 again 2012-10-07 02:27:37 -07:00
el-get-issue-672.el Always print with "print-level" and "print-length" nil 2012-03-29 14:52:43 -07:00
el-get-issue-683.el fix test 683, removed package has no status 2013-10-06 14:42:06 -04:00
el-get-issue-730.el Allow version to be specified as number, string, or list. 2012-05-28 13:50:46 -07:00
el-get-issue-772.el Fix spelling of word "package" 2012-11-02 15:32:19 +01:00
el-get-issue-809.el test http-tar method el-get-update 2013-10-06 14:59:41 -04:00
el-get-issue-835.el Better (and now failing) test for issue #835 2012-09-01 15:01:01 +02:00
el-get-issue-1006.el test for #1006 2013-09-24 21:12:46 -04:00
el-get-issue-1028.el Git clone should ignore depth when using http transport. 2013-02-04 04:33:45 +00:00
foo.php
issue-741-elpa-install-error.el Add test case for #741. 2012-05-13 11:59:06 -07:00
README.md Add usage in test/README.md 2012-11-25 02:37:37 +01:00
run-all-tests.sh Colorize output of run-*test.sh. 2013-05-15 14:58:50 +02:00
run-ert-interactive.sh Add test/run-ert-interactive.sh 2012-11-25 02:24:48 +01:00
run-ert.sh Add test/run-ert.sh 2012-11-25 02:01:21 +01:00
run-test-interactive.sh Fix run-test.sh and run-test-interactive.sh 2012-08-12 13:42:09 +02:00
run-test.sh Colorize output of run-*test.sh. 2013-05-15 14:58:50 +02:00
run-travis-ci.sh Run ert tests from run-travis-ci.sh 2012-11-25 02:30:28 +01:00
test-all-recipes.sh Fixes for test scripts 2012-10-06 19:16:18 -07:00
test-interactive.sh Fixes for test scripts 2012-10-06 19:16:18 -07:00
test-recipe-interactive.sh Fixes for test scripts 2012-10-06 19:16:18 -07:00
test-recipe.sh Fixes for test scripts 2012-10-06 19:16:18 -07:00
test-setup.el Fix typo in test-setup.el 2012-03-18 15:21:27 -07:00
test-utils.sh Colorize output of run-*test.sh. 2013-05-15 14:58:50 +02:00
test.el Load ert at top level in test.el 2012-11-25 02:29:02 +01:00

Tests

Like, yes, we have some! :)

el-get manual tests

Tries to cover some known issues, example that will allow building a regression test suite some day.

Typical run (in bash):

mkdir -p /tmp/test/.emacs.d/el-get/
rm -rf /tmp/test/.emacs.d/el-get/*
HOME=/tmp/test /usr/bin/emacs-snapshot-gtk -Q -batch -L . -l el-get \
    -l test/el-get-issue-303.el

At the moment you need to run the el-get-issue scripts with some known working el-get version to know what to expect, and you probably need to have el-get installed at +~/dev/emacs/el-get/+ for this to work as-is.

Yet it might be useful.

el-get automated tests

Simple script-based automation

In the test directory, there is a simple bash script called +run-test.sh+ that attempts to automate the manual steps detailed above. The script creates a temporary home directory and runs emacs in batch mode, first loading el-get and then the specified test file. An invocation equivalent to the above would look like this (starting from the main el-get directory):

test/run-test.sh el-get-issue-303.el

or even just

test/run-test.sh 303

The script takes care of cleaning up the temporary directory after the test, so you can run tests one after the other without previous tests causing problems for later ones. The bahavior of the +run-test.sh+ script can be customized with a few environment variables:

  • TMPDIR and TEST_HOME, for controlling where the temporary home directory is created;
  • EL_GET_LIB_DIR, the directory where the el-get code resides;
  • EMACS, which can be used to override the copy of emacs found in your PATH, or to provide one if there is no emacs in your PATH or it is installed under a nonstandard name.

You can run multiple tests by simply providing multiple test files to run-test.sh:

test/run-test.sh 200 303 310

When running multiple tests, the script will wait 5 seconds between tests, since many tests involve downloading files from the same few servers (Github, emacswiki, marmalade, etc.), and it is impolite to download a large number of files in rapid succession just for testing. There is a script called +run-all-tests.sh+ that acts as a shortcut for running all the available tests.

Sometimes you may want to run a test in an interactive emacs session so that you can use Emacs' debugging facilities to investigate what went wrong. To do this, use run-test-interactive.sh instead of run-test.sh.

If simply want to test installation, updating, and removal of one or more recipes, you can use the test-recipe.sh script.

ERT-based automation

See test.el in this directory. You can run ERT-based tests by:

test/run-ert.sh

To run the tests with GUI window for debugging, you can use:

test/run-ert-interactive.sh