From 5586b97d79c11fd87341c33990c0871b19c03249 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 29 Jan 2023 13:54:42 -0800 Subject: [PATCH] Add test of indoc with zero chars in last line --- tests/test_indoc.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_indoc.rs b/tests/test_indoc.rs index e0ead11..c849bfc 100644 --- a/tests/test_indoc.rs +++ b/tests/test_indoc.rs @@ -1,5 +1,15 @@ use indoc::indoc; +const HELP: &str = indoc! {" + Usage: ./foo +"}; + +#[test] +fn test_global() { + let expected = "Usage: ./foo\n"; + assert_eq!(HELP, expected); +} + #[test] fn byte_string() { let indoc = indoc! {b"