File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
examples/rust_lang_tester Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ fn main() {
27
27
. test_dir (" examples/rust_lang_tester/lang_tests" )
28
28
// Only use files named `*.rs` as test files.
29
29
. test_file_filter (| p | p . extension (). unwrap (). to_str (). unwrap () == " rs" )
30
+ // Treat lines beginning with "#" as comments.
31
+ . comment_prefix (" #" )
30
32
// Extract the first sequence of commented line(s) as the tests.
31
33
. test_extract (| p | {
32
34
read_to_string (p )
Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ fn main() {
17
17
let tempdir = TempDir :: new ( ) . unwrap ( ) ;
18
18
LangTester :: new ( )
19
19
. test_dir ( "examples/rust_lang_tester/lang_tests" )
20
- // Treat top-level lines beginning with "#" as comments.
21
- . comment_prefix ( "#" )
22
20
// Only use files named `*.rs` as test files.
23
21
. test_path_filter ( |p| p. extension ( ) . and_then ( |x| x. to_str ( ) ) == Some ( "rs" ) )
22
+ // Treat top-level lines beginning with "#" as comments.
23
+ . comment_prefix ( "#" )
24
24
// Extract the first sequence of commented line(s) as the tests.
25
25
. test_extract ( |p| {
26
26
read_to_string ( p)
Original file line number Diff line number Diff line change 24
24
//! .test_dir("examples/rust_lang_tester/lang_tests")
25
25
//! // Only use files named `*.rs` as test files.
26
26
//! .test_path_filter(|p| p.extension().and_then(|x| x.to_str()) == Some("rs"))
27
+ //! // Treat lines beginning with "#" as comments.
28
+ //! .comment_prefix("#")
27
29
//! // Extract the first sequence of commented line(s) as the tests.
28
30
//! .test_extract(|p| {
29
31
//! read_to_string(p)
You can’t perform that action at this time.
0 commit comments