Ivshti / video-name-parser

Parse names of video files to identify quality (e.g. 1080p), season/episode, year, etc.
MIT License
21 stars 4 forks source link

Tests #5

Open Ivshti opened 8 years ago

Ivshti commented 8 years ago

There should be tests for this, covering as many cases as possible.

E.g.:

"pioneer.one.s01.e02.mp4" "pioneer.one.102.mp4"

movies as well

Ivshti commented 8 years ago

added one test case, others can be added with copy paste

https://github.com/Ivshti/video-name-parser/commit/0a4df7369b16ceb77976bdd51cde8f3982ff0a37

vankasteelj commented 8 years ago
var movies = [
  "pioneer.one.avi",        //movie
  "pioneer.one.2014.avi",   //movie with year
  "pioneer.201.2014.avi",   //movie with stamp & year
  "pioneer.1980.2014.avi",  //movie with longstamp & year (new movie)
  "pioneer.2020.1980.avi"   //movie with longstam & year (old movie)
];
var shows = [
    "pioneer.one.s01e01.avi",       //show with long-md
    "pioneer.one.s1e1.avi",         //show with short-md //never seen
    "pioneer.one.1x1.avi",          //show with alt-short-md
    "pioneer.one.01x01.avi",        //show with alt-long-md
    "pioneer.one.season.1.episode.1.avi", //show with full md //never seen
    "pioneer.one.1014.avi",         //show with unmarked md
    "pioneer.one.2014.217.avi",     //show with year & unmarked short-md
    "pioneer.one.2014.1017.avi",    //show with year & unmarked long-md
    "pioneer.one.2014.s01e01.avi",  //show with year & long-md
    "pioneer.201.s01e01.avi"        //show with stamp & long-md
    "pioneer.201.2014.s01e01.avi"   //total fuck up
];
Ivshti commented 8 years ago

@vankasteelj thanks https://github.com/Ivshti/video-name-parser/commit/85aaabecf732484f78696a99fdbfd5ffb7bf3919

not perfect, but is something