mirror of
https://github.com/nushell/nushell
synced 2024-12-29 06:23:11 +00:00
26 lines
766 B
Rust
26 lines
766 B
Rust
|
use nu_test_support::fs::Stub::FileWithContent;
|
|||
|
use nu_test_support::nu;
|
|||
|
use nu_test_support::playground::Playground;
|
|||
|
|
|||
|
#[test]
|
|||
|
fn defs_contain_comment_in_help() {
|
|||
|
Playground::setup("comment_test", |dirs, sandbox| {
|
|||
|
sandbox.with_files(vec![FileWithContent(
|
|||
|
"my_def.nu",
|
|||
|
r#"
|
|||
|
# I comment and test. I am a good boy.
|
|||
|
def comment_philosphy [] {
|
|||
|
echo It’s not a bug – it’s an undocumented feature. (Anonymous)
|
|||
|
}
|
|||
|
"#,
|
|||
|
)]);
|
|||
|
|
|||
|
let actual = nu!(cwd: dirs.test(), r#"
|
|||
|
source my_def.nu
|
|||
|
help comment_philosphy
|
|||
|
"#);
|
|||
|
|
|||
|
assert!(actual.out.contains("I comment and test. I am a good boy."));
|
|||
|
});
|
|||
|
}
|