1
0
Fork 0

Correctly enforce upper case title IDs

This commit is contained in:
James 2018-01-03 08:19:52 +11:00
parent 2118dc9afd
commit c164bbad69
25 changed files with 59 additions and 62 deletions

View File

@ -15,7 +15,7 @@ region = "eur"
release_date = "2011-11-17" release_date = "2011-11-17"
[[ releases ]] [[ releases ]]
title = "000400000004e800" title = "000400000004E800"
region = "jpn" region = "jpn"
release_date = "2012-04-25" release_date = "2012-04-25"

View File

@ -5,22 +5,22 @@ needs_system_files = true
needs_shared_font = false needs_shared_font = false
[[ releases ]] [[ releases ]]
title = "00040000000fc500" title = "00040000000FC500"
region = "usa" region = "usa"
release_date = "2014-02-07" release_date = "2014-02-07"
[[ releases ]] [[ releases ]]
title = "00040000000fc600" title = "00040000000FC600"
region = "eur" region = "eur"
release_date = "2013-12-06" release_date = "2013-12-06"
[[ releases ]] [[ releases ]]
title = "000400000005e900" title = "000400000005E900"
region = "jpn" region = "jpn"
release_date = "2012-10-11" release_date = "2012-10-11"
[[ testcases ]] [[ testcases ]]
title = "00040000000fc600" title = "00040000000FC600"
compatibility = "1" compatibility = "1"
date = "2017-09-07" date = "2017-09-07"
version = "HEAD-e0cdaf7" version = "HEAD-e0cdaf7"

View File

@ -5,12 +5,12 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "00040000000bb500" title = "00040000000BB500"
region = "jpn" region = "jpn"
release_date = "2012-09-13" release_date = "2012-09-13"
[[ testcases ]] [[ testcases ]]
title = "00040000000bb500" title = "00040000000BB500"
compatibility = "0" compatibility = "0"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -6,12 +6,12 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[releases]] [[releases]]
title = "00040000001bf000" title = "00040000001BF000"
region = "usa" region = "usa"
release_date = "2017-07-13" release_date = "2017-07-13"
[[testcases]] [[testcases]]
title = "00040000001bf000" title = "00040000001BF000"
compatibility = "4" compatibility = "4"
date = "2017-10-18" date = "2017-10-18"
version = "HEAD-e9d1e8c" version = "HEAD-e9d1e8c"

View File

@ -5,12 +5,12 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "000400000013bb00" title = "000400000013BB00"
region = "all" region = "all"
release_date = "2015-05-31" release_date = "2015-05-31"
[[ testcases ]] [[ testcases ]]
title = "000400000013bb00" title = "000400000013BB00"
compatibility = "1" compatibility = "1"
date = "2017-06-08" date = "2017-06-08"
version = "HEAD-8c22334" version = "HEAD-8c22334"

View File

@ -4,12 +4,12 @@ needs_system_files = false
needs_shared_font = false needs_shared_font = false
[[ releases ]] [[ releases ]]
title = "000400000017d800" title = "000400000017D800"
region = "jpn" region = "jpn"
release_date = "2015-12-17" release_date = "2015-12-17"
[[ testcases ]] [[ testcases ]]
title = "000400000017d800" title = "000400000017D800"
compatibility = "0" compatibility = "0"
date = "2017-06-10" date = "2017-06-10"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -4,12 +4,12 @@ needs_system_files = false
needs_shared_font = true needs_shared_font = true
[[releases]] [[releases]]
title = "00040000001af800" title = "00040000001AF800"
region = "eur" region = "eur"
release_date = "2017-07-13" release_date = "2017-07-13"
[[testcases]] [[testcases]]
title = "00040000001af800" title = "00040000001AF800"
compatibility = "1" compatibility = "1"
date = "2017-09-11" date = "2017-09-11"
version = "HEAD-5880771" version = "HEAD-5880771"

View File

@ -5,12 +5,12 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "00040000001b6700" title = "00040000001B6700"
region = "jpn" region = "jpn"
release_date = "2017-01-25" release_date = "2017-01-25"
[[ testcases ]] [[ testcases ]]
title = "00040000001b6700" title = "00040000001B6700"
compatibility = "0" compatibility = "0"
date = "2017-06-10" date = "2017-06-10"
version = "HEAD-9a8a90b" version = "HEAD-9a8a90b"

View File

@ -5,12 +5,12 @@ needs_system_files = false
needs_shared_font = false needs_shared_font = false
[[ releases ]] [[ releases ]]
title = "0004000000187d00" title = "0004000000187D00"
region = "usa" region = "usa"
release_date = "2016-09-01" release_date = "2016-09-01"
[[ testcases ]] [[ testcases ]]
title = "0004000000187d00" title = "0004000000187D00"
compatibility = "4" compatibility = "4"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -5,12 +5,12 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "00040000000e5d00" title = "00040000000E5D00"
region = "usa" region = "usa"
release_date = "2013-06-13" release_date = "2013-06-13"
[[ releases ]] [[ releases ]]
title = "00040000000e9200" title = "00040000000E9200"
region = "eur" region = "eur"
release_date = "2012-09-06" release_date = "2012-09-06"
@ -20,7 +20,7 @@ region = "jpn"
release_date = "2011-06-27" release_date = "2011-06-27"
[[ testcases ]] [[ testcases ]]
title = "00040000000e9200" title = "00040000000E9200"
compatibility = "0" compatibility = "0"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -5,12 +5,12 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "00040000000cd400" title = "00040000000CD400"
region = "usa" region = "usa"
release_date = "2013-07-15" release_date = "2013-07-15"
[[ releases ]] [[ releases ]]
title = "00040000000cbc00" title = "00040000000CBC00"
region = "eur" region = "eur"
release_date = "2013-01-24" release_date = "2013-01-24"
@ -20,7 +20,7 @@ region = "jpn"
release_date = "2011-12-28" release_date = "2011-12-28"
[[ testcases ]] [[ testcases ]]
title = "00040000000cbc00" title = "00040000000CBC00"
compatibility = "0" compatibility = "0"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -5,7 +5,7 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "0004000000101d00" title = "0004000000101D00"
region = "usa" region = "usa"
release_date = "2013-10-03" release_date = "2013-10-03"
@ -15,7 +15,7 @@ region = "eur"
release_date = "2013-12-14" release_date = "2013-12-14"
[[ releases ]] [[ releases ]]
title = "00040000000eea00" title = "00040000000EEA00"
region = "jpn" region = "jpn"
release_date = "2013-06-12" release_date = "2013-06-12"

View File

@ -15,7 +15,7 @@ region = "eur"
release_date = "2014-05-22" release_date = "2014-05-22"
[[ releases ]] [[ releases ]]
title = "000400000010f000" title = "000400000010F000"
region = "jpn" region = "jpn"
release_date = "2013-11-20" release_date = "2013-11-20"

View File

@ -10,7 +10,7 @@ region = "usa"
release_date = "2014-11-13" release_date = "2014-11-13"
[[ releases ]] [[ releases ]]
title = "000400000014d200" title = "000400000014D200"
region = "eur" region = "eur"
release_date = "2014-11-13" release_date = "2014-11-13"

View File

@ -5,17 +5,17 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "000400000016ef00" title = "000400000016EF00"
region = "usa" region = "usa"
release_date = "2015-08-06" release_date = "2015-08-06"
[[ releases ]] [[ releases ]]
title = "000400000016e800" title = "000400000016E800"
region = "eur" region = "eur"
release_date = "2015-06-30" release_date = "2015-06-30"
[[ testcases ]] [[ testcases ]]
title = "000400000016ef00" title = "000400000016EF00"
compatibility = "0" compatibility = "0"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -5,17 +5,17 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "00040000001adb00" title = "00040000001ADB00"
region = "usa" region = "usa"
release_date = "2016-12-15" release_date = "2016-12-15"
[[ releases ]] [[ releases ]]
title = "00040000001ad600" title = "00040000001AD600"
region = "eur" region = "eur"
release_date = "2016-12-22" release_date = "2016-12-22"
[[ testcases ]] [[ testcases ]]
title = "00040000001adb00" title = "00040000001ADB00"
compatibility = "0" compatibility = "0"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -5,17 +5,17 @@ needs_system_files = false
needs_shared_font = false needs_shared_font = false
[[ releases ]] [[ releases ]]
title = "00040000000ba800" title = "00040000000BA800"
region = "usa" region = "usa"
release_date = "2013-03-24" release_date = "2013-03-24"
[[ releases ]] [[ releases ]]
title = "00040000000ba900" title = "00040000000BA900"
region = "eur" region = "eur"
release_date = "2013-05-17" release_date = "2013-05-17"
[[ testcases ]] [[ testcases ]]
title = "00040000000ba900" title = "00040000000BA900"
compatibility = "1" compatibility = "1"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -6,12 +6,12 @@ needs_shared_font = false
game_type = "eshop" game_type = "eshop"
[[ releases ]] [[ releases ]]
title = "000400000017c100" title = "000400000017C100"
region = "all" region = "all"
release_date = "2015-12-02" release_date = "2015-12-02"
[[ testcases ]] [[ testcases ]]
title = "000400000017c100" title = "000400000017C100"
compatibility = "1" compatibility = "1"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -9,12 +9,12 @@ region = "jpn"
release_date = "2015-11-03" release_date = "2015-11-03"
[[releases]] [[releases]]
title = "0004000000119a00" title = "0004000000119A00"
region = "usa" region = "usa"
release_date = "2015-11-03" release_date = "2015-11-03"
[[releases]] [[releases]]
title = "000400000012cb00" title = "000400000012CB00"
region = "eur" region = "eur"
release_date = "2015-11-03" release_date = "2015-11-03"
@ -29,7 +29,7 @@ os = "Windows 7 7601"
author = "flaviculpus" author = "flaviculpus"
[[testcases]] [[testcases]]
title = "0004000000119a00" title = "0004000000119A00"
compatibility = "0" compatibility = "0"
date = "2017-10-24" date = "2017-10-24"
version = "HEAD-e9d1e8c" version = "HEAD-e9d1e8c"

View File

@ -7,22 +7,22 @@ game_type = "vc"
vc_system = "nes" vc_system = "nes"
[[ releases ]] [[ releases ]]
title = "0004000000093e00" title = "0004000000093E00"
region = "jpn" region = "jpn"
release_date = "2012-07-25" release_date = "2012-07-25"
[[ releases ]] [[ releases ]]
title = "0004000000094e00" title = "0004000000094E00"
region = "usa" region = "usa"
release_date = "2012-12-27" release_date = "2012-12-27"
[[ releases ]] [[ releases ]]
title = "0004000000094f00" title = "0004000000094F00"
region = "eur" region = "eur"
release_date = "2012-12-27" release_date = "2012-12-27"
[[ testcases ]] [[ testcases ]]
title = "0004000000093e00" title = "0004000000093E00"
compatibility = "1" compatibility = "1"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8c22334" version = "HEAD-8c22334"

View File

@ -1,4 +1,4 @@
title = "World 3-2" title = "World 3-2"
description = "Restore Point at World 3-2 with 5 Lives and 65 Coins, Luigi Game and with Small Fire Luigi" description = "Restore Point at World 3-2 with 5 Lives and 65 Coins, Luigi Game and with Small Fire Luigi"
author = "Clector" author = "Clector"
title_id = "0004000000093e00" title_id = "0004000000093E00"

View File

@ -4,12 +4,12 @@ needs_system_files = false
needs_shared_font = false needs_shared_font = false
[[releases]] [[releases]]
title = "00040000000c8c00" title = "00040000000C8C00"
region = "usa" region = "usa"
release_date = "2013-10-29" release_date = "2013-10-29"
[[testcases]] [[testcases]]
title = "00040000000c8c00" title = "00040000000C8C00"
compatibility = "5" compatibility = "5"
date = "2017-08-17" date = "2017-08-17"
version = "HEAD-21204ba" version = "HEAD-21204ba"

View File

@ -7,22 +7,22 @@ game_type = "vc"
vc_system = "nes" vc_system = "nes"
[[ releases ]] [[ releases ]]
title = "000400000006e700" title = "000400000006E700"
region = "jpn" region = "jpn"
release_date = "2013-01-01" release_date = "2013-01-01"
[[ releases ]] [[ releases ]]
title = "000400000006e900" title = "000400000006E900"
region = "eur" region = "eur"
release_date = "2013-12-26" release_date = "2013-12-26"
[[ releases ]] [[ releases ]]
title = "000400000006e800" title = "000400000006E800"
region = "usa" region = "usa"
release_date = "2014-04-17" release_date = "2014-04-17"
[[ testcases ]] [[ testcases ]]
title = "000400000006e700" title = "000400000006E700"
compatibility = "1" compatibility = "1"
date = "2017-06-05" date = "2017-06-05"
version = "HEAD-8c22334" version = "HEAD-8c22334"

View File

@ -7,12 +7,12 @@ game_type = "vc"
vc_system = "gb" vc_system = "gb"
[[ releases ]] [[ releases ]]
title = "000400000007e700" title = "000400000007E700"
region = "usa" region = "usa"
release_date = "2011-12-22" release_date = "2011-12-22"
[[ testcases ]] [[ testcases ]]
title = "000400000007e700" title = "000400000007E700"
compatibility = "1" compatibility = "1"
date = "2017-06-04" date = "2017-06-04"
version = "HEAD-8f0a23b" version = "HEAD-8f0a23b"

View File

@ -201,7 +201,7 @@ function validateTOML(path) {
validateContents(release, "title", field => { validateContents(release, "title", field => {
if (field.length !== 16) { if (field.length !== 16) {
validationError(`Release #${i + 1}: Game title ID has an invalid length`); validationError(`Release #${i + 1}: Game title ID has an invalid length`);
} else if (!field.match(/^([a-zA-Z0-9]){16}$/)) { } else if (!field.match(/^([A-Z0-9]){16}$/)) {
validationError(`Release #${i + 1}: Game title ID is not a hexadecimal ID`); validationError(`Release #${i + 1}: Game title ID is not a hexadecimal ID`);
} }
}); });
@ -225,7 +225,7 @@ function validateTOML(path) {
validateContents(testcase, "title", field => { validateContents(testcase, "title", field => {
if (field.length !== 16) { if (field.length !== 16) {
validationError(`Testcase #${i + 1}: Game title ID has an invalid length`); validationError(`Testcase #${i + 1}: Game title ID has an invalid length`);
} else if (!field.match(/^([a-zA-Z0-9]){16}$/)) { } else if (!field.match(/^([A-Z0-9]){16}$/)) {
validationError(`Testcase #${i + 1}: Game title ID is not a hexadecimal ID`); validationError(`Testcase #${i + 1}: Game title ID is not a hexadecimal ID`);
} }
}); });
@ -261,9 +261,6 @@ function validateTOML(path) {
validationError("Test case dates are not properly sorted in ascending order."); validationError("Test case dates are not properly sorted in ascending order.");
}); });
} }
/* else {
validationError("No testcases.")
}*/
// We only check these if we have a known test result (we cannot know if a game needs // We only check these if we have a known test result (we cannot know if a game needs
// resources if it doesn't even run!) // resources if it doesn't even run!)
@ -291,7 +288,7 @@ function validateSaveTOML(path) {
validateContents(tomlDoc, "title_id", field => { validateContents(tomlDoc, "title_id", field => {
if (field.length !== 16) { if (field.length !== 16) {
validationError(`Game save data: Game title ID has an invalid length`); validationError(`Game save data: Game title ID has an invalid length`);
} else if (!field.match(/^([a-zA-Z0-9]){16}$/)) { } else if (!field.match(/^([A-Z0-9]){16}$/)) {
validationError(`Game save data: Game title ID is not a hexadecimal ID`); validationError(`Game save data: Game title ID is not a hexadecimal ID`);
} }
}); });