mirror of
https://github.com/casey/just
synced 2024-09-06 00:39:13 +00:00
.. | ||
completions | ||
allow_duplicate_recipes.rs | ||
allow_duplicate_variables.rs | ||
assert_stdout.rs | ||
assert_success.rs | ||
assertions.rs | ||
assignment.rs | ||
attributes.rs | ||
backticks.rs | ||
byte_order_mark.rs | ||
changelog.rs | ||
choose.rs | ||
command.rs | ||
completions.rs | ||
conditional.rs | ||
confirm.rs | ||
constants.rs | ||
delimiters.rs | ||
directories.rs | ||
dotenv.rs | ||
edit.rs | ||
equals.rs | ||
error_messages.rs | ||
evaluate.rs | ||
examples.rs | ||
export.rs | ||
fallback.rs | ||
fmt.rs | ||
functions.rs | ||
global.rs | ||
ignore_comments.rs | ||
imports.rs | ||
init.rs | ||
interrupts.rs | ||
invocation_directory.rs | ||
json.rs | ||
lib.rs | ||
line_prefixes.rs | ||
list.rs | ||
man.rs | ||
misc.rs | ||
modules.rs | ||
multibyte_char.rs | ||
newline_escape.rs | ||
no_aliases.rs | ||
no_cd.rs | ||
no_dependencies.rs | ||
no_exit_message.rs | ||
os_attributes.rs | ||
parser.rs | ||
positional_arguments.rs | ||
private.rs | ||
quiet.rs | ||
quote.rs | ||
readme.rs | ||
recursion_limit.rs | ||
regexes.rs | ||
run.rs | ||
search.rs | ||
search_arguments.rs | ||
shadowing_parameters.rs | ||
shebang.rs | ||
shell.rs | ||
shell_expansion.rs | ||
show.rs | ||
slash_operator.rs | ||
string.rs | ||
subsequents.rs | ||
summary.rs | ||
tempdir.rs | ||
test.rs | ||
undefined_variables.rs | ||
unstable.rs | ||
windows_shell.rs | ||
working_directory.rs |
use super::*; #[test] fn readme() { let mut justfiles = Vec::new(); let mut current = None; for line in fs::read_to_string("README.md").unwrap().lines() { if let Some(mut justfile) = current { if line == "```" { justfiles.push(justfile); current = None; } else { justfile += line; justfile += "\n"; current = Some(justfile); } } else if line == "```just" { current = Some(String::new()); } } for justfile in justfiles { let tmp = tempdir(); let path = tmp.path().join("justfile"); fs::write(path, justfile).unwrap(); let output = Command::new(executable_path("just")) .current_dir(tmp.path()) .arg("--dump") .output() .unwrap(); assert_success(&output); } }