summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-051.3.0liv
2019-06-05Auto merge of #167 - rust-lang:fix/remove-highlighting, r=komaedabors
Remove highlighting and syntect Closes #166 and #122
2019-06-05Commit Cargo.lock fileliv
2019-06-05Remove highlighting and syntectliv
2019-05-26Auto merge of #164 - HanKruiger:master, r=komaedabors
Fix broken link
2019-05-26Auto merge of #165 - gushroom:fix-outdated-links, r=komaedabors
fixed outdated links The links had the 2018 book in them and they were outdated.
2019-05-26fixed outdated linksgushroom
2019-05-26Fix broken linkHanKruiger
2019-05-25Auto merge of #163 - briankung:add_structs, r=komaedabors
Adds a simple exercise for structures Thanks for rustlings! Here's a small contribution in return.
2019-05-25Adds a simple exercise for structuresBrian Kung
2019-05-23Auto merge of #162 - c-rustacean:rustfmt-and-ws-fixes, r=komaedabors
errorsn.rs: Separate also the hints from each other to avoid accidental viewing
2019-05-23errorsn.rs: Separate also the hints from each other to avoid accidental viewingEddy Petrisor
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-22Auto merge of #161 - c-rustacean:rustfmt-and-ws-fixes, r=komaedabors
Rustfmt and ws fixes
2019-05-22rustfmt the exercisesEddy Petrisor
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-22iterator3.rs: whitespace fixesEddy Petrisor
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-22errorsn.rs: Separate hints from code, so hints are not accidentally seenEddy Petrisor
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-22Cargo fmt the rustlings application codeEddy Petrisor
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
2019-05-22Add not passing integration test (#154)liv
Add not passing integration test
2019-05-22Update errors1.rs - Add Result type signature as it is difficult for new ↵liv
comers to understand Generics and Error all at once. (#157) Update errors1.rs - Add Result type signature as it is difficult for new comers to understand Generics and Error all at once.
2019-05-12Update errors1.rsJulien Bisconti
Add Result type signature as it is difficult for new comers to understand Generics and Error all at once
2019-05-09Add not passing integration testDenys Smirnov
2019-05-071.2.2liv
2019-05-07Revert --nocapture flagliv
This closes #149 and #152
2019-04-221.2.1liv
2019-04-22add a slightly more helpful error messageliv
2019-04-22fix the --nocapture functionalityliv
2019-04-221.2.0liv
2019-04-22damn itliv
2019-04-22use -- --nocapture when testingliv
2019-04-22Auto merge of #144 - yvan-sraka:patch-0, r=komaedabors
Add errors to exercises that compile without user changes Hi ! I played a bit with rustlings, and I felt that some exercises were incorrect because they passed the tests without me needing to edit the files! This gave me the feeling that the exercise was skiped! Especially when I use `rustlings watch`, it is easy to miss an exercise because the compilation error that is displayed is the one of the next exercise ... It is easy to identify "broken" exercises with: ```bash % find exercises -name "*.rs" | xargs -n 1 rustlings run ... ✅ Successfully ran exercises/move_semantics/move_semantics4.rs ✅ Successfully tested exercises/test2.rs ``` My suggestion is to make sure that these files trigger a compilation error by adding a simple syntax error (e.g. with `???` in the code that must change) so that our Rustacean can then play with it!
2019-04-22Add errors to exercises that compile without user changesYvan Sraka
2019-04-141.1.1liv
2019-04-13Auto merge of #143 - cjpearce:fix-exercise-path-matching, r=komaedabors
Canonicalize paths to fix path matching This PR should fix #126. The main solution to the issue was using `canonicalize()` on the paths we create for the exercises from `info.toml` and any user-specified paths, so that path `ends_with` matching will work correctly. As adding calls to the canonicalize function everywhere requires unwrapping, I also decided to extract a struct representing an exercise and use serde to deserialize the paths from the `info.toml` file up front. I also tried to move the path handling out into the `exercise.rs` file and down into `main.rs` so that it doesn't create as much clutter. There was already a lot of unwrapping and path handling in the other files and I felt like it was getting a bit too repetitive. If the approach is going too far (too many changes etc.) I'm happy to try to produce a smaller PR that fixes the bug without any refactoring.
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-08Auto merge of #142 - diodfr:patch-1, r=komaedabors
Fix links by deleting book version
2019-04-08Fix links by deleting book versionDiod FR
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-07Update ci test command to allow multithreaded testsChris Pearce
2019-04-07Auto merge of #141 - cjpearce:fix/run-panics-on-compile-fail, r=komaedabors
Stop run from panicking when compile fails Currently if you use the `rustlings run` command and your program fails to compile, rustlings will panic while trying to exit. First I've added a couple of integration tests to cover this case, which also meant moving a few tests so that the new fixtures didn't cause `verify_all_success` to fail. Then I noticed that the existing integration tests that test for failure pass even when rustlings panics, preventing the new tests from failing. I've updated the integration tests to distinguish between when rustlings has failed in the way that we want (exit code 1) rather than a panic (exit code 101). Finally I fixed the actual panic, which was just caused by unwrapping when rustlings should probably be exiting cleanly.
2019-04-07Fix test failing due to panicChris Pearce
2019-04-07Modify integration tests to fail on panicChris Pearce
2019-04-07Add process id to temp file nameChris Pearce
2019-04-07Extract command builders into utilChris Pearce
2019-04-03Auto merge of #134 - rust-lang:fix/windows-paths, r=komaedabors
fix watch command path execution @hades32 @guttume could you test whether this works on windows by checking out the branch locally and running `cargo run watch`?
2019-03-28Merge pull request #137 from mgeier/patch-1komaeda
Fix order of true/false in tests for executables
2019-03-28Fix order of true/false in tests for executablesMatthias Geier
1b3469f236bc6979c27f6e1a04e4138a88e55de3 has fixed the tests themselves, but now the original error shows itself.
2019-03-28make installation command checks more thoroughliv
2019-03-27fix watch command path executionliv