Files
rust_template/tests/greet.rs
T
tomatocream 2583848813 Add integration test example and project rename script
tests/greet.rs shows the tests/ convention alongside the existing
inline unit test in src/lib.rs, so both standard locations are covered.

scripts/rename-project.sh replaces the "rust_template" placeholder
throughout Cargo.toml, flake.nix, nix/rust.nix, src/main.rs,
benches/greet.rs, and tests/greet.rs, then regenerates Cargo.lock.
Verified in a scratch copy: renamed crate builds, tests pass, and the
Nix package builds and runs correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018ALEXkc7pTro7tF1WcUuKb
2026-08-11 00:16:55 +08:00

7 lines
120 B
Rust

use rust_template::greet;
#[test]
fn greets_by_name() {
assert_eq!(greet("integration"), "Hello, integration!");
}