1
0
Fork 0
mirror of https://github.com/sile/hls_m3u8.git synced 2024-11-15 20:01:01 +00:00

more codecov

This commit is contained in:
Luro02 2019-09-28 13:56:55 +02:00
parent 9b668dfd9e
commit 89a3904385
2 changed files with 54 additions and 2 deletions

View file

@ -26,10 +26,13 @@ script:
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
which cargo-install-update || cargo install cargo-update
cargo install-update --all
# Uncomment the following line for coveralls.io
cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID --run-types Tests Doctests
# cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
# Uncomment the following two lines create and upload a report for codecov.io
cargo tarpaulin --out Xml
cargo tarpaulin --out Xml --run-types Tests Doctests
bash <(curl -s https://codecov.io/bash)
fi

View file

@ -1116,6 +1116,55 @@ mod test {
.parse()
.unwrap()
);
assert_eq!(
ExtXMedia::builder()
.media_type(MediaType::Audio)
.group_id("audio-aacl-312")
.language("en")
.name("English")
.is_autoselect(true)
.is_default(true)
.channels("2")
.build()
.unwrap(),
"#EXT-X-MEDIA:\
TYPE=AUDIO,\
GROUP-ID=\"audio-aacl-312\",\
LANGUAGE=\"en\",\
NAME=\"English\",\
DEFAULT=YES,\
AUTOSELECT=YES,\
CHANNELS=\"2\""
.parse()
.unwrap()
);
assert_eq!(
ExtXMedia::builder()
.media_type(MediaType::Subtitles)
.uri("french/ed.ttml")
.group_id("subs")
.language("fra")
.assoc_language("fra")
.name("French")
.is_autoselect(true)
.characteristics("public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound")
.build()
.unwrap(),
"#EXT-X-MEDIA:\
URI=\"french/ed.ttml\",\
TYPE=SUBTITLES,\
GROUP-ID=\"subs\",\
LANGUAGE=\"fra\",\
ASSOC-LANGUAGE=\"fra\",\
NAME=\"French\",\
AUTOSELECT=YES,\
FORCED=NO,\
CHARACTERISTICS=\"public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound\"".parse().unwrap()
);
//
// ----
assert_eq!(
ExtXMedia::new(MediaType::Audio, "foo", "bar"),