X-Git-Url: https://njoseph.me/gitweb/nimcoon.git/blobdiff_plain/811928a79e13b5534aaa08e05f9d3745c9a9023f..956837326555259ef33d1bab42a3981b4082b20a:/tests/tests.nim diff --git a/tests/tests.nim b/tests/tests.nim index dad726c..8b9e6d2 100644 --- a/tests/tests.nim +++ b/tests/tests.nim @@ -13,7 +13,15 @@ suite "Playing direct links": check(sanitizeURL("https://www.youtube.com/watch\\?v\\=QOEMv0S8AcA") == expected) test "validate options": - let invalidOptions = to_table({"musicOnly": true, "feelingLucky": false, "fullScreen": true, "download": false}) - check(not isValidOptions(invalidOptions)) - let validOptions = to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": true}) - check(isValidOptions(validOptions)) + let invalidOptionsList = [ + to_table({"musicOnly": true, "feelingLucky": false, "fullScreen": true, "download": false}), + to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": true}) + ] + for invalidOptions in invalidOptionsList: + check(not isValidOptions(invalidOptions)) + let validOptionsList = [ + to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": false, "download": true}), + to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": false}) + ] + for validOptions in validOptionsList: + check(isValidOptions(validOptions))