summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-06-14chore: Move from master branch to main branchmokou
2020-06-04feat: Add a --nocapture option to display test harnesses' outputsAbdou Seck
This new feature can be accessed by invoking rustlings with --nocapture. Both unit and integration tests added. closes #262 BREAKING CHANGES: The following function take a new boolean argument: * `run` * `verify` * `test` * `compile_and_test`
2020-06-04Collapse nested if statementsAbdou Seck
2020-06-03Use .to_string rather than format macroAbdou Seck
2020-04-11fix(run): compile clippy exercise filesRohan Jain
Additionally to running clippy, also compile the exercise file so that `rustling run clippy1` works after a successful completion of the exercise. closes #291 Signed-off-by: Rohan Jain <crodjer@gmail.com>
2020-04-06feature: makes "compile" exercise print output, resolves #270Roberto Vidal
When running "compile"-mode exercises in interactive `verify` mode, we print their output when we prompt the learner if they want to continue. This improves the "experimentation" experience, since trying different things does produce a visible change.
2020-02-26feat: Add clippy lintsMario Reder
- adds a new 'clippy' category for exercises - clippy exercises should throw no warnings - install script now also installs clippy is related to https://github.com/rust-lang/rust-clippy/issues/2604
2020-02-20refactor: exercise evaluationRoberto Vidal
Exercise evaluation (compilation + execution) now uses Results Success/failure messages are standardized
2019-12-26feat: Show a completion message when watchingKate Hart
The completion message is shown only once all exercises succeed and are not annotated with "I AM NOT DONE." The watch command will also exit closes #251
2019-11-18feat(watch): show hint while watchingvyaslav
2019-11-12fix(run): makes `run` never promptRoberto Vidal
`watch` and `verify` do prompt the user to actively move to the next exercise. This change fixes `run` to never prompt. Previously it was inconsistent between "test" and "compile" exercises. BREAKING CHANGE: we again change the behavior of the `run` command
2019-11-11feat(cli): check for rustc before doing anythingRoberto Vidal
Addresses #190.
2019-11-11Address feedbackmarisa
2019-11-11fix testsmarisa
2019-11-11Merge branch 'master' into refactor-hintsmarisa
2019-11-11feat(hint): Add test for hintmarisa
2019-11-11feat: Refactor hint systemmarisa
Hints are now accessible using the CLI subcommand `rustlings hint <exercise name`. BREAKING CHANGE: This fundamentally changes the way people interact with exercises.
2019-11-11feat: improve `watch` execution modeRoberto Vidal
The `watch` command now requires user action to move to the next exercise. BREAKING CHANGE: this changes the behavior of `watch`.
2019-11-11feat: Index exercises by namemarisa
BREAKING CHANGE: This changes the way you use `rustlings run` by now requiring an abridged form of the previous filename, e.g: `rustlings run exercises/if/if1.rs` becomes `rustlings run if1`
2019-11-09improvement(watch): clear screen before each `verify()`WofWca
Closes #146
2019-11-09watch: clears terminal before entering loopJubilee Young
If someone is sliding in and out of "watch" mode, it can make it hard to tell which error messages are still relevant. This patch resolves that by clearing the terminal entirely before entering watch's loop.
2019-10-21feat: Added exercise for struct update syntaxViacheslav Avramenko
2019-07-11Check if changed exercise file exists before calling verify.Fredrik Jambrén
2019-06-10chore: Remove missed highlighting char from Issue #133Dan Wilhelm
2019-06-05Remove highlighting and syntectliv
2019-05-22Cargo fmt the rustlings application codeEddy Petrisor
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-07Revert --nocapture flagliv
This closes #149 and #152
2019-04-22add a slightly more helpful error messageliv
2019-04-22fix the --nocapture functionalityliv
2019-04-22damn itliv
2019-04-22use -- --nocapture when testingliv
2019-04-12Clean up test includes for File and PathChris Pearce
2019-04-12Remove unwrap on canonicalize resultChris Pearce
2019-04-12Extract exercise struct to encapsulate path logicChris Pearce
2019-04-07Auto merge of #140 - cjpearce:fix/test-race-condition, r=komaedabors
Fix intermittent test failure caused by race condition First public pull request 😬 There's an intermittent integration test failure when you use multiple test threads (at least for me on a mac). I narrowed it down to two tests each spawning a process using `Command` which then try to compile the same file at the same time. If the timing doesn't work out, they both try to compile, and then one process runs `clean` before the other can run the executable - causing a panic. ![Screenshot 2019-04-07 at 19 54 55](https://user-images.githubusercontent.com/3453268/55688324-20520980-596f-11e9-8474-5215d61a4387.png) You can prevent it from happening by running with a single thread (`cargo test -- --test-threads=1`), because the `Command` blocks. That's not a particularly good solution though because it's not something you can configure in `Cargo.toml`. I considered making the affected tests just run serially, but it occurred to me that this could also happen if someone accidentally runs rustlings in watch mode in two terminals without realising it. I wound't consider this that unlikely given it's a tool for learning. I fixed it by ensuring that the executables made from separate processes don't conflict by appending a process id to the output executable name. I also extracted the commands into a single file next to `clean` so that we don't have to repeat the generated file name everywhere and risk missing something.
2019-04-07Fix test failing due to panicChris Pearce
2019-04-07Add process id to temp file nameChris Pearce
2019-04-07Extract command builders into utilChris Pearce
2019-03-27fix watch command path executionliv
2019-03-20add testslyn
2019-03-17Be nicer when rustlings isn't run from the right directory.Kyle Isom
Before, rustlings would panic if it wasn't in the right directory. It took me a minute to figure out why, and this wasn't my first intro to Rust. It would probably help new users if they saw a helpful message instead of a stack trace.
2019-03-15Remove unnessecary whitespaceAndrew Bagshaw
2019-03-15Change to \nAndrew Bagshaw
2019-03-13Add clear break between verify executionsAndrew Bagshaw
2019-03-13deduplicateAndrew Bagshaw
2019-03-13Start verification at most recently modified fileAndrew Bagshaw
2019-03-11clippy-ifylyn
2019-03-06standardize exercise running via an external toml filelyn
2019-03-06Fix file watching for vim swap filesShaun Bennett
2019-02-17Add thread exercises to verify entrypointHirokazu Hata