From 8b35f094619ae24dec69067ae06bc33b57619275 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Fri, 16 Sep 2022 01:29:32 -0400 Subject: [PATCH] [noop] Include readme code in the unit tests (#402) This is a noop (we don't have any code in the readme at the moment), but it ensures that if any is added, it all will compile properly. --- src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 1c03d447..424fb16e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,3 +7,16 @@ pub mod server; pub mod source; pub mod table_source; pub mod utils; + +// Ensure README.md contains valid code +#[cfg(doctest)] +mod test_readme { + macro_rules! external_doc_test { + ($x:expr) => { + #[doc = $x] + extern "C" {} + }; + } + + external_doc_test!(include_str!("../README.md")); +}