Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
drahnr committed Oct 10, 2023
1 parent 2ab0080 commit fa67588
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/run-make/env-dep-info/macro_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use proc_macro::*;

#[proc_macro]
pub fn access_env_vars(_: TokenStream) -> TokenStream {
let _ = tracked::env_var("EXISTING_PROC_MACRO_ENV");
let _ = tracked::env_var("NONEXISTENT_PROC_MACEO_ENV");
let _ = tracked_env::var("EXISTING_PROC_MACRO_ENV");
let _ = tracked_env::var("NONEXISTENT_PROC_MACEO_ENV");
TokenStream::new()
}
4 changes: 2 additions & 2 deletions tests/run-make/track-path-dep-info/macro_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ use std::str;

#[proc_macro]
pub fn access_tracked_paths(_: TokenStream) -> TokenStream {
assert!(tracked::path("emojis.txt").is_ok());
assert!(tracked_path::path("emojis.txt").is_ok());

// currently only valid utf-8 paths are supported
let invalid = [1_u8, 2,123, 254, 0, 0, 1, 1];
let invalid: &str = unsafe {
str::from_utf8_unchecked(&invalid[..])
};
assert!(tracked::path(invalid).is_err());
assert!(tracked_path::path(invalid).is_err());

TokenStream::new()
}

0 comments on commit fa67588

Please sign in to comment.