-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a crate::test::testcase()
function for internal use
#83
Labels
Comments
Playground for a possible solution: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1bee6b3dc7140e4b1a20e50c4c44bf7f The |
phorward
added a commit
to phorward/tokay
that referenced
this issue
Nov 8, 2022
Intention is to solve tokay-lang#83 differently.
Relates to #86 |
phorward
added a commit
that referenced
this issue
Nov 30, 2022
* Removing output/error from Runtime and Compiler Intention is to solve #83 differently. * Improving test::testcase() function - Allows for direct code exposal - Improved error reporting in assert_eq!() * tests()-test runs all testcases in folder "tests/" * testcase() using repl-mode * test_expressions.tok with testmode:repl usage * Some docs and testcase testcase ;-) * Improving testcase - Count and report line numbers - Trim result lines * Starting separated, topic-based tests * Starting test substitution by test cases * Fixing assignment operatins in brackets * Substituting tests for assig-ops by testcase * Tests for inline increment/decrement * Renaming testcases and removing testcase calls * Separating sequence tests, glob filter tests * Adding prelude tests * Improving testcase(), replacing whitespace test * Moving unescaping tests into testcase * Moving error test into testcase * Substituting further tests from test.rs * Replacing dict-tests by tests/dict.tok testcase * Converting token_modifiers test into testcase * Substitute language test-cases from test.rs This is a nice milestone on the test conversion; Now only the builtin-tests are available in their particular modules. * Moving list tests into list.tok testcase * Moving str tests into str.tok testcase * Rewrote token tests and fixed bug Bug with pluralized character-classes, e.g. AsciiAlphabetics wasn't found, but Alphabetics due incomplete type distinguishing. * Rewrote parselet testcases / ParseletRef::repr() * Moving all remaining tests to separate testcases * First version of tokay_tests!() macro Macro generates [test]-functions from testcases in tests/*.tok which are evaluating during a `cargo test` run similar to the tests before. Removed the `tests()` function with similar use-case but not running in parallel as well. * Moving testcase to utils * Removed bug #87 bypass in test `captures.tok`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The existing function
crate::test::testcase()
is a great way to express tests, because a test-case can be expressed as one source file having 3 sections:There are 2 to 3 sections separated by
#---
:Currently, this implementation runs
tokay
in a separate process and modifies stdin, stdout and stderr to feed input. It would be nicer to let this work likecrate::utils::run()
which runs a program on a given source, but with redirected input and output.The text was updated successfully, but these errors were encountered: