• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

alloc_fill.rsH A D22-Nov-2019815 3224

alloc_with.rsH A D26-Mar-20191.3 KiB6749

quickchecks.rsH A D22-Nov-20196.9 KiB231203

readme_up_to_date.rsH A D20-Dec-2019647 2318

string.rsH A D07-Feb-2020438 2017

tests.rsH A D22-Nov-20195.1 KiB196151

vec.rsH A D07-Feb-20201.4 KiB6046

readme_up_to_date.rs

1 use std::fs;
2 use std::process::Command;
3 
4 #[test]
cargo_readme_up_to_date()5 fn cargo_readme_up_to_date() {
6     println!("Checking that `cargo readme > README.md` is up to date...");
7 
8     let expected = Command::new("cargo")
9         .arg("readme")
10         .current_dir(env!("CARGO_MANIFEST_DIR"))
11         .output()
12         .expect("should run `cargo readme` OK")
13         .stdout;
14     let expected = String::from_utf8_lossy(&expected);
15 
16     let actual = fs::read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))
17         .expect("should read README.md OK");
18 
19     if actual != expected {
20         panic!("Run `cargo readme > README.md` to update README.md");
21     }
22 }
23