use repo_path_macro::{repo_include_str, repo_path};

#[test]
fn should_determine_repo_path() {
    let readme = repo_path!("README.md");

    assert!(readme.exists());
    assert_eq!(readme.file_name().unwrap(), "README.md");
}

#[test]
fn should_include_str_with_quotes() {
    let content = repo_include_str!("assets/with_quotes.txt");

    assert_eq!(content, "Sample file with \"quotes\".\n");
    assert_eq!(content, include_str!("../../assets/with_quotes.txt"));
}


#[test]
fn ui() {
    let test = trybuild::TestCases::new();
    test.compile_fail("tests/ui/*/*.rs");
}
