@@ -4,21 +4,30 @@ use super::*;
4
4
fn test_span_hash_one_line ( ) {
5
5
let source = "some text\n tidy-tag\n checkme=42\n tidy-tag\n " ;
6
6
let tag = "tidy-tag" ;
7
- assert_eq ! ( "42258eba764c3f94a24de379e5715dc8" , span_hash( source, tag, & mut true ) . unwrap( ) ) ;
7
+ assert_eq ! (
8
+ "42258eba764c3f94a24de379e5715dc8" ,
9
+ span_hash( source, tag, & mut true , Path :: new( "" ) ) . unwrap( )
10
+ ) ;
8
11
}
9
12
10
13
#[ test]
11
14
fn test_span_hash_multiple_lines ( ) {
12
15
let source = "some text\n tidy-tag\n checkme=42\n other line\n tidy-tag\n " ;
13
16
let tag = "tidy-tag" ;
14
- assert_eq ! ( "49cb23dc2032ceea671ca48092750a1c" , span_hash( source, tag, & mut true ) . unwrap( ) ) ;
17
+ assert_eq ! (
18
+ "49cb23dc2032ceea671ca48092750a1c" ,
19
+ span_hash( source, tag, & mut true , Path :: new( "" ) ) . unwrap( )
20
+ ) ;
15
21
}
16
22
17
23
#[ test]
18
24
fn test_span_hash_has_some_text_in_line_with_tag ( ) {
19
25
let source = "some text\n tidy-tag ignore me\n checkme=42\n other line\n tidy-tag\n " ;
20
26
let tag = "tidy-tag" ;
21
- assert_eq ! ( "49cb23dc2032ceea671ca48092750a1c" , span_hash( source, tag, & mut true ) . unwrap( ) ) ;
27
+ assert_eq ! (
28
+ "49cb23dc2032ceea671ca48092750a1c" ,
29
+ span_hash( source, tag, & mut true , Path :: new( "" ) ) . unwrap( )
30
+ ) ;
22
31
}
23
32
24
33
#[ test]
@@ -35,5 +44,8 @@ RUN curl -LS -o perf.zip https://github.com/rust-lang/rustc-perf/archive/$PERF_C
35
44
mv rustc-perf-$PERF_COMMIT rustc-perf && \
36
45
rm perf.zip"# ;
37
46
let tag = "tidy-ticket-perf-commit" ;
38
- assert_eq ! ( "76c8d9783e38e25a461355f82fcd7955" , span_hash( source, tag, & mut true ) . unwrap( ) ) ;
47
+ assert_eq ! (
48
+ "76c8d9783e38e25a461355f82fcd7955" ,
49
+ span_hash( source, tag, & mut true , Path :: new( "" ) ) . unwrap( )
50
+ ) ;
39
51
}
0 commit comments