@@ -28,7 +28,7 @@ fn basic() {
28
28
error. file( ) . replace( r"\" , "/" ) ,
29
29
"openssl-errors/tests/test.rs"
30
30
) ;
31
- assert_eq ! ( error. line( ) , 20 ) ;
31
+ assert_eq ! ( error. line( ) , line! ( ) - 11 ) ;
32
32
cfg_if ! {
33
33
if #[ cfg( ossl300) ] {
34
34
// https://github.com/openssl/openssl/issues/12530
@@ -41,7 +41,7 @@ fn basic() {
41
41
42
42
#[ test]
43
43
fn static_data ( ) {
44
- openssl_errors:: put_error!( Test :: BAR , Test :: NO_BACON , "foobar" ) ;
44
+ openssl_errors:: put_error!( Test :: BAR , Test :: NO_BACON , "foobar {{}} " ) ;
45
45
46
46
let error = Error :: get ( ) . unwrap ( ) ;
47
47
assert_eq ! ( error. library( ) . unwrap( ) , "test library" ) ;
@@ -52,8 +52,8 @@ fn static_data() {
52
52
error. file( ) . replace( r"\" , "/" ) ,
53
53
"openssl-errors/tests/test.rs"
54
54
) ;
55
- assert_eq ! ( error. line( ) , 44 ) ;
56
- assert_eq ! ( error. data( ) , Some ( "foobar" ) ) ;
55
+ assert_eq ! ( error. line( ) , line! ( ) - 11 ) ;
56
+ assert_eq ! ( error. data( ) , Some ( "foobar {} " ) ) ;
57
57
}
58
58
59
59
#[ test]
@@ -69,6 +69,6 @@ fn dynamic_data() {
69
69
error. file( ) . replace( r"\" , "/" ) ,
70
70
"openssl-errors/tests/test.rs"
71
71
) ;
72
- assert_eq ! ( error. line( ) , 61 ) ;
72
+ assert_eq ! ( error. line( ) , line! ( ) - 11 ) ;
73
73
assert_eq ! ( error. data( ) , Some ( "hello world" ) ) ;
74
74
}
0 commit comments