Teach custom carts about Crystal

Both features landed independently and each was green on its own, so the gap
only appears in the combination.

- tools/cartkit.py BASES did not list crystal, so cartkit rejected a Crystal
  cart as an unknown base game. The Lua validator never had this problem: it
  asks GameVersion.VERSIONS, so it accepted Crystal the moment the row existed.
- Two self-tests used the literal "crystal" as their never-a-game sentinel and
  invert now that Crystal is real: tests/engine/cart_manifest.lua and
  cartkit's own t_identity. Both re-pointed at "nonesuch", the token the rest
  of the suite already uses for this.
This commit is contained in:
bryanthaboi
2026-08-23 12:21:50 -04:00
parent ebf44f20d3
commit f895293217
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ rejects(function(c) c.label = "../../etc/passwd" end, "cart label", "a climbing
rejects(function(c) c.label = "/etc/passwd" end, "cart label", "an absolute label path") rejects(function(c) c.label = "/etc/passwd" end, "cart label", "an absolute label path")
rejects(function(c) c.label = ("a"):rep(129) end, "cart label", "a 129 character label path") rejects(function(c) c.label = ("a"):rep(129) end, "cart label", "a 129 character label path")
rejects(function(c) c.base = nil end, "cart base", "a missing base game") rejects(function(c) c.base = nil end, "cart base", "a missing base game")
rejects(function(c) c.base = "crystal" end, "cart base", "an unknown base game") rejects(function(c) c.base = "nonesuch" end, "cart base", "an unknown base game")
rejects(function(c) c.engine = "" end, "cart engine", "an empty engine range") rejects(function(c) c.engine = "" end, "cart engine", "an empty engine range")
rejects(function(c) c.engine = 3 end, "cart engine", "a numeric engine range") rejects(function(c) c.engine = 3 end, "cart engine", "a numeric engine range")
rejects(function(c) c.seal = "welded" end, "cart seal", "an unknown seal") rejects(function(c) c.seal = "welded" end, "cart seal", "an unknown seal")
+2 -2
View File
@@ -57,7 +57,7 @@ BUNDLE_FORMAT = "g1rcart"
BUNDLE_VERSION = 1 BUNDLE_VERSION = 1
CART_SCHEMA = 1 CART_SCHEMA = 1
BASES = ("red", "blue", "yellow", "gold", "silver") BASES = ("red", "blue", "yellow", "gold", "silver", "crystal")
SEALS = ("sealed", "open") SEALS = ("sealed", "open")
SOURCES = ("github", "gamebanana") SOURCES = ("github", "gamebanana")
MAX_MODS = 64 MAX_MODS = 64
@@ -1380,7 +1380,7 @@ def t_identity():
("title", ""), ("title", "t" * 49), ("title", ""), ("title", "t" * 49),
("version", "1.0"), ("version", "v1.0.0"), ("version", "1.0"), ("version", "v1.0.0"),
("author", ""), ("shell", "8b1a1a"), ("author", ""), ("shell", "8b1a1a"),
("shell", "#8b1a1"), ("base", "crystal"), ("shell", "#8b1a1"), ("base", "nonesuch"),
("seal", "welded"), ("schema", 2), ("seal", "welded"), ("schema", 2),
("summary", "s" * 121), ("repo", "someone"), ("summary", "s" * 121), ("repo", "someone"),
("engine", ">=1.0.0 <<2.0.0")): ("engine", ">=1.0.0 <<2.0.0")):