@@ -20,6 +20,7 @@ load "../helpers/load"
2020# │ └── .lima.yaml -> github:jandubois//loop/
2121# ├── docs
2222# │ └── .lima.yaml -> ../templates/demo.yaml
23+ # ├── example.yaml -> templates/demo.yaml
2324# ├── invalid
2425# │ ├── org
2526# │ │ └── .lima.yaml -> github:lima-vm
@@ -35,9 +36,12 @@ load "../helpers/load"
3536# └── .lima.yaml "{}"
3637#
3738# Both the `main` branch and the `v0.0.0` tag have this layout.
38-
39+ #
3940# All these URLs should redirect to the same template URL (either on "main" or at "v0.0.0"):
4041# "https://raw.githubusercontent.com/jandubois/jandubois/${tag}/templates/demo.yaml"
42+ #
43+ # Additional tests rely on jandubois/lima existing and containing the v1.2.1 tag.
44+
4145URLS=(
4246 github:jandubois/jandubois/templates/demo.yaml@main
4347 github:jandubois/jandubois/templates/demo.yaml
@@ -54,6 +58,10 @@ URLS=(
5458 github:jandubois/
5559 github:jandubois@v0.0.0
5660 github:jandubois
61+ github:jandubois/jandubois/example.yaml
62+ github:jandubois/jandubois/example@main
63+ github:jandubois//example.yaml@v0.0.0
64+ github:jandubois//example
5765 github:jandubois/jandubois/docs/.lima.yaml@main
5866 github:jandubois/jandubois/docs/.lima.yaml
5967 github:jandubois/jandubois/docs/.lima
@@ -96,11 +104,12 @@ done
96104}
97105
98106@test ' hidden files without an extension get a .yaml extension' {
99- url -0 ' github:jandubois//test/.hidden'
100- assert_output ' https://raw.githubusercontent.com/jandubois/jandubois/main/test/.hidden.yaml'
107+ url -1 ' github:jandubois//test/.hidden'
108+ assert_fatal ' file " https://raw.githubusercontent.com/jandubois/jandubois/main/test/.hidden.yaml" not found or inaccessible: status 404 '
101109}
102110
103111@test ' files that have an extension do not get a .yaml extension' {
112+ # This command doesn't fail because only *.yaml files are checked for redirects/symlinks, and therefore fail right away if they don't exist.
104113 url -0 ' github:jandubois//test/.script.sh'
105114 assert_output ' https://raw.githubusercontent.com/jandubois/jandubois/main/test/.script.sh'
106115}
0 commit comments