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
This commit is contained in:
2026-08-11 00:16:55 +08:00
parent 840cea1f10
commit 2583848813
2 changed files with 60 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
use rust_template::greet;
#[test]
fn greets_by_name() {
assert_eq!(greet("integration"), "Hello, integration!");
}