1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-06-17 12:20:33 +00:00

even more codecov

This commit is contained in:
Luro02 2019-09-28 14:33:44 +02:00
parent 9e0da9738f
commit c0db47b717
2 changed files with 45 additions and 6 deletions

View file

@ -5,6 +5,8 @@ cache: cargo
before_cache: |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
cargo install cargo-tarpaulin
cargo install cargo-update
cargo install-update --all
fi
before_cache:
@ -25,10 +27,6 @@ script:
- cargo test
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
which cargo-install-update || cargo install cargo-update
cargo install-update --all
fi
# this does require a -Z flag for Doctests, which is unstable!
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
cargo tarpaulin --out Xml --run-types Tests Doctests

View file

@ -955,6 +955,28 @@ mod test {
FORCED=YES,\
CHARACTERISTICS=\"public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound\"".to_string()
);
assert_eq!(
ExtXMedia::builder()
.media_type(MediaType::ClosedCaptions)
.group_id("cc")
.language("sp")
.name("CC2")
.instream_id(InStreamId::Cc2)
.is_autoselect(true)
.build()
.unwrap()
.to_string(),
"#EXT-X-MEDIA:\
TYPE=CLOSED-CAPTIONS,\
GROUP-ID=\"cc\",\
LANGUAGE=\"sp\",\
NAME=\"CC2\",\
AUTOSELECT=YES,\
INSTREAM-ID=\"CC2\""
.to_string()
);
// ----
assert_eq!(
ExtXMedia::new(MediaType::Audio, "foo", "bar").to_string(),
@ -1166,7 +1188,6 @@ mod test {
.unwrap()
);
// TODO add below to test_parser
assert_eq!(
ExtXMedia::builder()
.media_type(MediaType::Audio)
@ -1213,7 +1234,27 @@ mod test {
FORCED=NO,\
CHARACTERISTICS=\"public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound\"".parse().unwrap()
);
//
assert_eq!(
ExtXMedia::builder()
.media_type(MediaType::ClosedCaptions)
.group_id("cc")
.language("sp")
.name("CC2")
.instream_id(InStreamId::Cc2)
.is_autoselect(true)
.build()
.unwrap(),
"#EXT-X-MEDIA:\
TYPE=CLOSED-CAPTIONS,\
GROUP-ID=\"cc\",\
LANGUAGE=\"sp\",\
NAME=\"CC2\",\
AUTOSELECT=YES,\
INSTREAM-ID=\"CC2\""
.parse()
.unwrap()
);
// ----
assert_eq!(