Tree @master (Download .tar.gz)
HISTORY.md @master — view markup · raw · history · blame
History
Version 0.14 "Jean Baptiste Point DuSable Lake Shore Drive":
- Add a pragma "Functionality ... is implemented by shell command ... but only if shell command ... succeeds". If the second shell command given in the pragma cannot be run or exits with a non-zero exit code, the implementation given by the first shell command is not registered for the given functionality. (If no tests at all are run, it is an error.)
falderal's own test suite,test.sh, tests runningfalderalunder Python 2 if it is available, and under Python 3 if it is available. If neither is available, it aborts. A particular implementation of Python can also be supplied in thePYTHONenvironment variable. Note however that Python 3 is still required to be installed when running the tests (to run the helper scripts.)- The
falderalcommand and the helper utilities (such asfa-under-pty) run underpython3by default now. - Some internal unit tests for
falderalwere accidentally deactivated in some previous version; they are now restored. py-falderalis now generally referred to asfalderal.- Specification edited for clarity and license text simplified.
Version 0.13 "Merchandise Mart":
- Use
ArgumentParserinstead ofOptionParserinternally. --substring-erroris now the default behaviour, and if this option is given, it will be ignored. After a long time considering the problem, we finally determined that it does not make sense to insist that different implementations produce the exact same error message.--verboseoption now prints out commands for each test as it is run.- Added conventional
--versionoption. - Planned to be the last 0.x series release before 1.0.
- Added
setup.pyso that Falderal can be treated as a Python package.
Version 0.12 "Schoenhofen Brewery":
- When expanding variables in declaration strings, use
string.replaceinstead ofre.subso that backslash-escaping is not perfomed on the replacement string. (Thanks to James Holderness for bug report and patch.) - In "freestyle" format, lines beginning with
<=,<==, or<===can supply a section of test input text (Thanks to James Holderness for feature suggestion and patch.) - Falderal is now responsible for quoting all shell metacharacters
in the substituion text of
%(...)variables when command line templates are expanded, so that no quotes need be placed around the variable in the template. (Again, thanks to James Holderness for spotting the bug in the code that led to this improvement.) py-falderalcan now run under both Python 2 and Python 3 (tested with 2.7, 3.4, and 3.5.)- The doctests that were previously distributed throughout the
source code have been converted to a suite of unit tests in
the
falderal.testsmodule. The-tcommand-line option has been removed; to run internal tests, run this module instead.
Version 0.11 "Dan Ryan Expressway":
- Renamed the internal tests to have descriptive names instead of numbers.
- The first command-line argument being
testfor compatibility with previous versions offalderalhas been removed. - Massive internal refactor of block-parsing and test-extraction code.
- Supports a new format for test blocks, called "freestyle", where if
the last few lines of a block are prefixed with
=>or==>or===>or?>or??>or???>, the preceding part of the block needs no prefixes at all, and it is simply treated as one verbatim test body.
Version 0.10 "Shedd Aquarium":
- Removed the old, bitrotting Haskell implementation.
- Removed deprecated
%(test-text)and%(test-file)variables (%(test-body-text)and%(test-body-file)should be used now.) - Added some adapters in the
script/directory of the repo:fa-under-ptyruns a target program under a pseudoterminalfa-bin-to-hexconverts 8-bit binary output to hexadecimal codesfa-hex-to-binconverts hexadecimal codes to 8-bit binary output
- Added the rule that a test may consist of an input section (
+) if there was a previous test, and the test body of the previous test will be re-used with the new input in the new test.
Version 0.9-2014.0525 "Municipal Pier #2, May 25th 2014":
- Shell implementations assume input and output is encoded UTF-8; any malformed UTF-8 is simply ignored (for better or worse, for now.) Falderal documents are assumed to be encoded in UTF-8; this includes test bodies, expectations, etc. Internally, in the reference implementation, all strings are stored as Unicode.
Version 0.9-2014.0427 "Municipal Pier #2":
- For a test of a shell command implementation that expects a failure,
if no output was found on standard error, the output of standard output
is checked against the failure expectation instead. The primary use case
for this is Hugs, which (unlike
ghc) displays error messages on stdout rather than stderr. "Municipal Pier #2" was the original name of Navy Pier.
Version 0.9 "Navy Pier":
py-falderalnow insists that blocks are indented four spaces, as the specification says. It ignores blocks that are not indented.- In an error report
py-falderalreports the location (filename and line number of the beginning of the test text) of each test that failed, as well as the name of the functionality that was being tested. - Several internal renamings of class and variable names for greater clarity.
- Trying to standardize on the terminology "test body" for the body of a test (as opposed to its "input", and opposed to it being passed to a shell command line "as text".)
- Support for specifying a block of text to be used as input for a test.
- Dropped support for "implemented by Haskell function" backwards-compatibility.
- Temporary files are no longer always created in the current directory. That
was a workaround to support
ghcfrom Haskell Platform under Cygwin. They are now created where the system wants them to be created (but you can set theTMPenvironment variable to "." if you really want them to be created in the current directory.) py-falderalnow complains and stops early if there were no documents specified, no functionality definitions were found in any of the documents, no implementations were found for some defined functionality, or if no tests were found in any of the documents, unless--cavalieris passed on the command line.- In
--verbosemode,py-falderalwill issue warnings about any test that has been run twice (i.e. more than run on identical test body text and implementation.) - If
py-falderalcatches aKeyboardInterruptexception while running tests, it shows a report of all the tests that it did manage to run until that point, and a warning message to the effect that not all tests were run.
Version 0.8 "Ukrainian Village":
- The reference implementation is now
py-falderal. - Blocks must now be indented four spaces. That Falderal test documents
will be embedded in Markdown is generally assumed (although not strictly
required) and they generally have the file extension
.markdownso that other software (e.g. Bitbucket and Github) knows how to pretty-display them. - Various documentation which was on Bitbucket (wiki, issues) and Github (py-falderal issues) have been moved into Markdown documents in the distribution, which have themselves been re-organized.
- Added the
-v/--verboseflag and made it and the-d/--dumpflag do what you would expect from them. - The
-f/--functionalitiesand-c/--clear-functionalitiesflags have been removed. The rationale is that implementations of functionalities are clumsy to express on the command line (and anyway the syntax would have to be different) while it is not difficult to create a "configuration" Falderal file which specifies only the desired implementations of the desired functionalities, and to load it just before loading a "tests" Falderal file which specified the functionalities being tested, but not their implementations.
Version 0.7 "Ogden Avenue":
- Note that this is the final version of Falderal where
Test.Falderalis the reference implementation. In subsequent versions,py-falderal(written in Python) will be the reference implementation.Test.Falderalwill still be in this repository (under theimpldirectory) but will no longer be definitive, and will go essentially unmaintained. - Fixed a bug where number of lines in the intermediary results file was sometimes being counted incorrect.
- Slightly improved support for running under Cygwin.
- Tests that are implemented by a shell command are now run directly
from the
falderalprocess (instead of creating an intermediary shell script and running it.) This resulted in better performance. - Addition of
-bcommand-line option, which considers a test to have passed if the expected exception message is a substring (rather than an exact match) of the actual produced exception message. TODO: write test for this. - Blocks may now be indented four spaces, to allow them to be embedded directly in Markdown files as pre-formatted text.
- A script to just build the binary, without installing it, was added.
Version 0.6 "Streeterville":
- Variables may be included in the specification of a shell command
implementation; these will be expanded before generating the results
generator. These variable include
%(test-text),%(test-file), and%(output-file). falderalnow lets the user specify, on the command line, the implementations for a named functionality. Supplying-f 'foo:shell command "foo.sh %(test-file)"'has the same effect as including the pragmaFunctionality "foo" is implemented by shell command "foo.sh %(test-file)"in the Falderal file. Note that this is in addition to the Functionality-definition pragmas given in the Falderal file; to replace them, you must first clear the ones with that name from the file by supplying-c fooon the command line.falderalalso allows tests for named functionalities to be skipped completely, by passing the name of the functionality to be skipped after a-kflag on the command line.- The Markdown formatter now formats Bird-style embedded code with HTML embedded in the Markdown document. This is so that it can be styled independently from, and thus distinguished from, any plain Markdown indented code blocks which may appear in the literate portion of the source code.
- In failure reports, the implementation of the functionality of the test that failed is now reported in each failure.
- A race condition(?) that could occur when testing multiple implementations
of a functionality, of different kinds (Haskell and shell), has been
prevented. Both tests were writing to
results.txtand immediately deleting it, and this would sometimes confusefalderalinto thinking one had produced no results (perhaps a result of some creative scheduling byghc, although really, I haven't a clue.) Results are now written to different temporary files with different, generated names. - Previously, if the output of a shell command being tested did not end with a newline, the intermediate results file was not being generated correctly, resulting in failures being misreported. This has been recitified.
- Previously, if there were tests given in a Falderal file before any Tests-for pragma was specified, those tests would just be ignored. An error message is now issued, and no testing takes place.
- Previously, if multiple Falderal files were given on the command line, they were simply concatenated when loaded, the result being that Functionality-definitions from the first file were visible in the second file, and that any Tests-for in effect at the end of the first file would be in effect at the start of the second file. Files are now loaded and processed seperately.
Version 0.5 "The Loop":
- The command-line format of
falderalhas changed, for the better. Thetestsubcommand no longer requires that the failure reporting style be specified; instead, it defaults tostandard, and can be changed with a command-line option. There are also command-line options for selecting the programs to run results generators, and to keep generated files around instead of cleaning them up after testing. - The dependency on
ghcfor running Haskell results generators has been removed; these can be run byrunhaskellnow, and are run byrunhaskellby default. - Failure reporting is now consistent across languages; both Haskell and
Bourne shell results generators generate an intermediate format, which
falderaldigests. - A new pragma
encoding:was added, so that this directive can be embedded in your Falderal document (for the benefit of your text editor) without necessarily appearing in the formatted document. - We began giving release milestones colorful names. The naming
convention is to choose names of Chicagoland neigborhoods, suburbs,
landmarks, and institutions. Version 0.5 was named after The Loop in
recognition of its ability to shuttle test results between
falderaland the various results generators implemented in different languages. Previous versions ofTest.Falderalwere retroactively given milestone names during this release.
Version 0.4 "Blackstone Hotel":
- For ease of installation, the project is presented as a Cabal package.
- A driver executable,
falderal, is built as part of installing the Cabal package. It provides a command-line interface to formatting Falderal files and, in a limited fashion, running the tests in them. - A shell script formatter has been written, enabling testing of shell commands. One caveat is that reporting for these tests is nowhere near as nice as for Haskell functions, but that will change in the next version.
- The Functionality-definition pragma has been implemented, making it possible to write tests in a more abstract, implementation-independent fashion.
- Falderal files written to work with Falderal 0.3 should still work with Falderal 0.4, but you are encouraged to use the Functionality-definition pragma introduced in 0.4 to make your tests more implementation-independent.
Version 0.3 "Chicago Board of Trade":
- The definition of a Falderal Literate Test Format, distinct from the
reference implementation of tools for it in Haskell (
Test.Falderal). This represented a fairly substantial departure from how previous versions of Falderal worked. - The ability to format a Falderal file to different formats, including Markdown and Haskell.
- Running tests is now a matter of formatting a Falderal file as a Haskell
module and running the function
testModulein that module.
Version 0.2 "Dearborn Station":
- Added a test harness for Falderal itself, in the form of a simple shell
script which diffs the output of
Test.Falderal.Demoagainst a text file containing the expected content. - Improved formatting of failure reports. Multi-line input text or expected output is always presented starting on its own line.
- Tests may be organized into groups; the entire group is preceded by some literal text, but there is no literal text between the tests in the group. When one of these tests fails, the literal text for the group is reported, along with the number of the test within the group.
- Fixed a bug where exception text which extended over multiple lines could not be expected correctly.
Version 0.1 "Haymarket Square":
- Provision of a framework for writing and running literate tests which may be embedded in literate Haskell source code.
- Testing Haskell functions of type
String -> String. A test specifies input to the function, and may expect a particular output, or that a particular exception is thrown. - Through simple adapters, testing functions of other types such as
(Show a) => String -> a.
Prehistory:
Falderal started life as a Haskell-specific hack that could be embedded in a Bird-style Literate Haskell source file. I took a framework for literate tests I had already written in a project called Rho, and used it as the basis of this code.
I wrote it because I was designing yet another esoteric programming language, and while working on it I realized I was rebuilding yet another ad-hoc unit test suite, like I had done a half-dozen times before. I didn't want to keep doing this for every language I designed, and I realized that literate test suites could serve as documentation as well; the result was Falderal.