Fredrik Jambrén
ba85ca32c4
Check if changed exercise file exists before calling verify.
5 years ago
Dan Wilhelm
f72e0ca979
chore: Remove missed highlighting char from Issue #133
5 years ago
liv
62696f5819
Remove highlighting and syntect
5 years ago
Eddy Petrisor
ca6bf966dd
Cargo fmt the rustlings application code
...
Signed-off-by: Eddy Petrisor <eddy.petrisor@gmail.com>
5 years ago
liv
35c3d0b3fc
Revert --nocapture flag
...
This closes #149 and #152
5 years ago
liv
7eddee6f7a
add a slightly more helpful error message
6 years ago
liv
f2c48cfac5
fix the --nocapture functionality
6 years ago
liv
bfcf38c8bc
damn it
6 years ago
liv
9e328da641
use -- --nocapture when testing
6 years ago
Chris Pearce
77de6e5d6a
Clean up test includes for File and Path
6 years ago
Chris Pearce
8c867a001a
Remove unwrap on canonicalize result
6 years ago
Chris Pearce
d01a71f7de
Extract exercise struct to encapsulate path logic
6 years ago
bors
ffb165ce26
Auto merge of #140 - cjpearce:fix/test-race-condition, r=komaeda
...
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.
6 years ago
Chris Pearce
0c7bd12372
Fix test failing due to panic
6 years ago
Chris Pearce
592ae6b4d2
Add process id to temp file name
6 years ago
Chris Pearce
4fa79ee02f
Extract command builders into util
6 years ago
liv
022921168d
fix watch command path execution
6 years ago
lyn
f43cb124f6
add tests
6 years ago
Kyle Isom
9fc4a83987
Be nicer when rustlings isn't run from the right directory.
...
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.
6 years ago
Andrew Bagshaw
3b5dfac44e
Remove unnessecary whitespace
6 years ago
Andrew Bagshaw
a6a8b61b12
Change to \n
6 years ago
Andrew Bagshaw
6cd42bb821
Add clear break between verify executions
6 years ago
Andrew Bagshaw
4d7ce6e571
deduplicate
6 years ago
Andrew Bagshaw
3f114cc069
Start verification at most recently modified file
6 years ago
lyn
abf175111d
clippy-ify
6 years ago
lyn
70e59cca3c
standardize exercise running via an external toml file
6 years ago
Shaun Bennett
04d0f78a2c
Fix file watching for vim swap files
6 years ago
Hirokazu Hata
5cd5be8847
Add thread exercises to verify entrypoint
6 years ago
liv
02ceb0ba8c
fix test command execution
...
seems like i forgot that you actually need to run executables created
with `rustc --test`! this also reworks the "test1" exercise a bit
closes #108
6 years ago
liv
320119ce96
add "--color always" to the other rustc commands
6 years ago
liv
8cff8de493
add more detailed command help
6 years ago
liv
dc1f3b79f8
add tests; refactor exercise links
6 years ago
liv
141db7795b
add --test run flag
6 years ago
liv
17e12433cb
add a test
6 years ago
liv
b90f642029
remove the ex*.rs files
6 years ago
liv
7fa2f87c8b
make the default output a bit nicer
6 years ago
liv
e03a98cbf6
rustfmt
6 years ago
liv
a388bb3798
split codebase
6 years ago
liv
679508b278
ah well it was worth a try
6 years ago
liv
ad26a6d0e6
revert
6 years ago
liv
a0d21020df
update for rust 2018
6 years ago
Erik Vesteraas
9d16d6b63d
Add watch mode, and don't panic on clean failure
6 years ago
olivia
a4b4350b70
switch theme to base16 eighties
6 years ago
olivia hugger
a15b276d96
Merge pull request #98 from evestera/rustc-color-always
...
Propagate colored output from rustc
6 years ago
olivia
1d495ff7b9
add markdown output for default command
6 years ago
Erik Vesteraas
f18590f0a1
Add color=always to rustc options
6 years ago
olivia
e0ee5f1d7f
implement run command
6 years ago
olivia
6baac88574
fmt
6 years ago
olivia
b8789f09e0
add empty line after ascii
6 years ago
olivia
6cc16edff0
add a fancy ascii header
6 years ago
olivia
b3c52803e9
color output messages
6 years ago
olivia
18a1447a65
add the whole curriculum
6 years ago
olivia
f7846af7ac
right let's try this one again
6 years ago
olivia
850a13e913
oh, commit this
6 years ago
olivia
4eca18050f
put it in a separate file
6 years ago
olivia
69ff4a8b25
replace macros with more general methods
6 years ago
olivia
2f1e3bc0c7
small fixes
6 years ago
olivia
6d50965344
port the first exercise from the old curriculum
6 years ago
olivia
89f2a986c0
rustfmt
6 years ago
olivia
5310dfd406
make the initial output prettier
6 years ago
olivia
39b3e3225a
add another example
6 years ago
olivia
d9946a91d4
make the example work
6 years ago
olivia
8ea1b17fd9
format
6 years ago
olivia
97efff760d
use macros
6 years ago
olivia
595a91df55
experiment
6 years ago
olivia
8ecc1e6ff1
move to another file
6 years ago
olivia
d0e3a6e770
make return explicit
7 years ago
olivia
7148233950
add a sample
7 years ago
olivia
3ffefa32e1
init new cargo project
7 years ago
olivia
5e89d1e888
move old files to a separate directory
7 years ago
Carol (Nichols || Goulding)
426e5cf3f5
Don't be lazy, actually read the file instead of including it at compile time
7 years ago
Carol (Nichols || Goulding)
70aa18699b
Make a handlebars helper that uses prlink to generate a link from a file
7 years ago
Carol (Nichols || Goulding)
2ac0d5982c
Introduce handlebars to be able to do templating
7 years ago
Carol (Nichols || Goulding)
87d8131f1f
Start a script to regenerate README.md from a template
...
So far this doesn't actually do any templating, just adds a note about
the README being autogenerated :)
7 years ago