Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Conversation

@mattt
Copy link
Contributor

@mattt mattt commented Nov 24, 2020

Resolves #13
Fixes #25

This PR changes the syntax for DocTest expectations in source code. Currently => matches the expected REPL output. With this change, => instead matches the value literal in the REPL output.

The following table documents all of the available expectations:

Code Meaning
1 + 2 // -> String assert type
1 + 2 // => 3 assert value
1 + 2 // ~> String = \d assert pattern match
1 / 0 // !! error: division by zero assert error

In addition, this PR also refactors the use of regular expression into a new Scanner type and fixes a bug in the regex pattern that caused DocTest annotations to be missed.

@mattt mattt merged commit 80fe437 into master Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error: use of unresolved identifier Support additional test operators

2 participants