17 lines
290 B
Rust
17 lines
290 B
Rust
|
|
//! Demo crate for Stack.Gallery Registry e2e tests
|
||
|
|
|
||
|
|
/// Greets the given name
|
||
|
|
pub fn greet(name: &str) -> String {
|
||
|
|
format!("Hello, {}!", name)
|
||
|
|
}
|
||
|
|
|
||
|
|
#[cfg(test)]
|
||
|
|
mod tests {
|
||
|
|
use super::*;
|
||
|
|
|
||
|
|
#[test]
|
||
|
|
fn test_greet() {
|
||
|
|
assert_eq!(greet("World"), "Hello, World!");
|
||
|
|
}
|
||
|
|
}
|