File: README

package info (click to toggle)
surfraw 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,624 kB
  • sloc: sh: 7,977; perl: 824; makefile: 277
file content (51 lines) | stat: -rw-r--r-- 1,597 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
			  Surfraw Test Suite
			  ------------------

To test the elvi, run

make test

in the root of the source tree.

To run individual test(s), change into the test/ directory and run

./runtests test1.test test2.test...

Some tests may fail temporarily, for instance if there are network
problems or the site is overloaded, it is worth waiting and retrying
before filing a bug.

Notes
-----

To run the test suite, perl and libwww-perl (lwp) must be installed.

To run woffle.test successfully:

1. wwwoffle must be running on localhost:8080
2. wget must be installed (for preloading the wwwoffle cache)
3. htdig must be installed (for generating the search indexes)
3. the user running the tests must be able to run
   sudo /usr/share/wwwoffle/search/htdig/wwwoffle-htdig-incr
   to update the htdig index

Writing tests
-------------

Tests should be called elviname.test and be placed in the test/ directory

Test files consist of pairs of lines. The first line is the command to
run (starting with the elvi name, don't use a leading 'sr' or
'surfraw', and the second line is a perl regular expression (which can
be just plain text) to match against the resulting web page.

Multiple tests can be implemented per elvi, feel free to submit more!

When new test files have been written, add them to EXTRA_DIST in
test/Makefile.am, rerun autotools, and 'git add' them too.

If an elvis cannot be tested automatically, it can be marked as such
by starting the first line of the .test file with SKIP followed by an
optional reason.

If a cookie is needed (eg with sunsolve), add it to test/COOKIES.