Merge branch 'basic-markdown-test' into 'master'

Basic markdown test

See merge request pastebin.run/server!10
This commit is contained in:
Konrad Borowski 2019-08-09 08:16:38 +00:00
commit a7f7a8a308
2 changed files with 28 additions and 1 deletions

View File

@ -1,8 +1,22 @@
build:
image: rust:1.36
script:
- rustc --version && cargo --version
- &print_version rustc --version && cargo --version
- cargo build --release --verbose
artifacts:
paths:
- target/release/pastebinrun
test:1.36:
image: rust:1.36
script: &test_script
- *print_version
- cargo test --verbose
test:stable:
script: *test_script
image: rust:latest
test:nightly:
script: *test_script
image: rustlang/rust:nightly

View File

@ -76,3 +76,16 @@ fn render_markdown(markdown: &str) -> String {
);
FILTER.clean(&output).to_string()
}
#[cfg(test)]
mod test {
use super::render_markdown;
#[test]
fn markdown_works() {
assert_eq!(
render_markdown("**bold**"),
"<p><strong>bold</strong></p>\n"
);
}
}