//! Tests for Rust playground support. use crate::prelude::*; // Verifies that a rust codeblock gets the playground class. #[test] fn playground_on_rust_code() { BookTest::from_dir("playground/playground_on_rust_code").check_main_file( "book/index.html", str![[r##"

Rust Sample

#![allow(unused)]
fn main() {
let x = 1;
}
"##]], ); } // When the playground is disabled, there should be no playground class. #[test] fn disabled_playground() { BookTest::from_dir("playground/disabled_playground").check_main_file( "book/index.html", str![[r##"

Rust Sample

let x = 1;
"##]], ); }