Experimenting with more structured ways to handle command-line input/output in Rust
//! End-to-end test for generics support in the `fluent_embed_derive` macro

mod common;

use common::compare_message;
use fluent_embed::localize;
use icu_locale::langid;

#[localize("tests/locale/**/basic.ftl")]
pub struct Greeting<T> {
    name: T,
}

#[test]
fn string() {
    let name = "Ferris";
    compare_message(Greeting { name }, "Hello, Ferris!", langid!("en-US"))
}

#[test]
fn number() {
    let name = 2;
    compare_message(Greeting { name }, format!("Hello, 2!"), langid!("en-US"))
}