#!/usr/bin/env bash

# Enable test when `Swift` installation will be fixed on Linux (for docker run)
# Wait for https://github.com/jdx/mise/pull/1708
exit 0

mise use swift

assert "mise x spm:nicklockwood/SwiftFormat@0.53.10 -- swiftformat --version" "0.53.10"
assert "mise x spm:https://github.com/nicklockwood/SwiftFormat.git@0.53.10 -- swiftformat --version" "0.53.10"

# test package with resources (`templates list` command depends on resources being installed)
assert "mise x spm:SwiftGen/SwiftGen@6.6.2 --verbose -- swiftgen templates list --only colors" "colors:
   - literals-swift4
   - literals-swift5
   - swift4
   - swift5
---
You can also specify custom templates by path, using \`templatePath\` instead of \`templateName\`.
For more information, see the documentation on GitHub or use \`swiftgen template doc\`.
"
