important_packages: change the order of arguments in the template (#13577)

Leads to a cleaner and less confusing code - an empty command
doesn't mean 'nimble test' anymore.
This commit is contained in:
Miran 2020-03-03 16:25:59 +01:00 • committed by GitHub
commit e8c057fb27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 55 deletions

View file

@ -10,7 +10,7 @@
## Include for the tester that contains test suites that test special features
## of the compiler.
# included from tester.nim
# included from testament.nim
import important_packages
@ -456,10 +456,8 @@ let
packageIndex = nimbleDir / "packages_official.json"
iterator listPackages(): tuple[name, url, cmd: string, hasDeps: bool] =
let defaultCmd = "nimble test"
let packageList = parseFile(packageIndex)
for n, cmd, hasDeps, url in important_packages.packages.items:
let cmd = if cmd.len == 0: defaultCmd else: cmd
if url.len != 0:
yield (n, url, cmd, hasDeps)
else: