1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
|
Description: Skip TestCommands/mod*.txt which need internet or npm
testscripts/commands/mod{,_get,_get_u,_vendor,__disable,_npm*}.txt
require Go module, internet access or npm which are not available
during Debian package build.
Author: Anthony Fok <foka@debian.org>
Origin: vendor
Forwarded: not-needed
Last-Update: 2023-06-29, 2023-09-23, 2023-10-11, 2023-11-05, 2024-02-24
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/testscripts/commands/mod.txt
+++ b/testscripts/commands/mod.txt
@@ -1,48 +1,4 @@
-# Test the hugo mod commands.
-
-dostounix golden/vendor.txt
-dostounix golden/go.mod.testsubmod
-
-hugo mod graph
-stdout 'empty-hugo'
-hugo mod verify
-! stderr .
-hugo mod get -u
-! stderr .
-hugo mod get -u ./...
-! stderr .
-hugo mod vendor
-! stderr .
-cmp _vendor/modules.txt golden/vendor.txt
-hugo mod clean
-! stderr .
-stdout 'hugo: removed 1 dirs in module cache for \"github.com/bep/empty-hugo-module\"'
-hugo mod clean --all
-stdout 'Deleted 2\d{2} files from module cache\.'
-cd submod
-hugo mod init testsubmod
-cmpenv go.mod $WORK/golden/go.mod.testsubmod
hugo mod get -h
stdout 'hugo mod get \[flags\] \[args\]'
hugo mod get --help
stdout 'hugo mod get \[flags\] \[args\]'
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/bep/empty-hugo-module"
-[[module.imports.mounts]]
-source="README.md"
-target="content/_index.md"
--- go.mod --
-go 1.19
-
-module github.com/gohugoio/testmod
--- submod/hugo.toml --
-title = "Hugo Sub Module"
--- golden/vendor.txt --
-# github.com/bep/empty-hugo-module v1.0.0
--- golden/go.mod.testsubmod --
-module testsubmod
-
-go ${GOVERSION}
--- a/testscripts/commands/mod_vendor.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-dostounix golden/vendor.txt
-
-hugo mod vendor
-cmp _vendor/modules.txt golden/vendor.txt
-ls _vendor/github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml
-stdout 'config.toml'
-ls _vendor/github.com/gohugoio/hugo-mod-integrationtests/withhugotoml
-stdout 'hugo.toml'
-
-
-
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-go 1.19
-
-module github.com/gohugoio/testmod
-
-require (
- github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml v1.0.0
- github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.0.0
-)
-
--- golden/vendor.txt --
-# github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml v1.0.0
-# github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.0.0
--- a/testscripts/commands/mod__disable.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-hugo mod graph
-stdout 'withhugotoml.*commonmod'
-
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-disable = true
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-module foo
-go 1.19
-
--- a/testscripts/commands/mod_get.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-hugo mod get
-stderr 'withhugotoml.*v1.1.0'
-
--- hugo.toml --
-title = "Hugo Modules Test"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-disable = true
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-module foo
-go 1.20
-
--- a/testscripts/commands/mod_get_u.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-hugo mod get -u
-hugo mod graph
-stdout 'commonmod@v1.0.1.*commonmod2@v1.0.2'
-
--- hugo.toml --
-title = "Hugo Modules Update Test"
-theme = ["my-theme"]
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withconfigtoml"
-disable = true
-[[module.imports]]
-path="github.com/gohugoio/hugo-mod-integrationtests/withhugotoml"
--- go.mod --
-module foo
-go 1.20
-require (
- github.com/gohugoio/hugo-mod-integrationtests/withhugotoml v1.1.0 // indirect
- github.com/gohugoio/hugo-mod-integrationtests/commonmod v0.0.0-20230823103305-919cefe8a425 // indirect
-)
--- themes/my-theme/dummy.txt --
-MY THEME
--- a/testscripts/commands/mod_npm.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Test mod npm.
-
-dostounix golden/package.json
-
-hugo mod npm pack
-cmp package.json golden/package.json
-
--- hugo.toml --
-baseURL = "https://example.org/"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugoTestModule2"
-
-
--- golden/package.json --
-{
- "comments": {
- "dependencies": {
- "react-dom": "github.com/gohugoio/hugoTestModule2"
- },
- "devDependencies": {
- "@babel/cli": "github.com/gohugoio/hugoTestModule2",
- "@babel/core": "github.com/gohugoio/hugoTestModule2",
- "@babel/preset-env": "github.com/gohugoio/hugoTestModule2",
- "postcss-cli": "github.com/gohugoio/hugoTestModule2",
- "tailwindcss": "github.com/gohugoio/hugoTestModule2"
- }
- },
- "dependencies": {
- "react-dom": "^16.13.1"
- },
- "devDependencies": {
- "@babel/cli": "7.8.4",
- "@babel/core": "7.9.0",
- "@babel/preset-env": "7.9.5",
- "postcss-cli": "7.1.0",
- "tailwindcss": "1.2.0"
- },
- "name": "script-mod_npm",
- "version": "0.1.0"
-}
--- go.mod --
-module github.com/gohugoio/hugoTestModule
--- a/testscripts/commands/mod_npm_withexisting.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-# Test mod npm.
-
-dostounix golden/package.json
-
-hugo mod npm pack
-cmp package.json golden/package.json
-
--- hugo.toml --
-baseURL = "https://example.org/"
-[module]
-[[module.imports]]
-path="github.com/gohugoio/hugoTestModule2"
--- package.json --
-{
- "comments": {
- "foo": {
- "a": "b"
- }
- },
- "devDependencies": {
- "tailwindcss": "2.2.0"
- },
- "name": "mypackage",
- "version": "1.1.0"
-}
--- golden/package.json --
-{
- "comments": {
- "dependencies": {
- "react-dom": "github.com/gohugoio/hugoTestModule2"
- },
- "devDependencies": {
- "@babel/cli": "github.com/gohugoio/hugoTestModule2",
- "@babel/core": "github.com/gohugoio/hugoTestModule2",
- "@babel/preset-env": "github.com/gohugoio/hugoTestModule2",
- "postcss-cli": "github.com/gohugoio/hugoTestModule2",
- "tailwindcss": "project"
- },
- "foo": {
- "a": "b"
- }
- },
- "dependencies": {
- "react-dom": "^16.13.1"
- },
- "devDependencies": {
- "@babel/cli": "7.8.4",
- "@babel/core": "7.9.0",
- "@babel/preset-env": "7.9.5",
- "postcss-cli": "7.1.0",
- "tailwindcss": "2.2.0"
- },
- "name": "mypackage",
- "version": "1.1.0"
-}
--- go.mod --
-module github.com/gohugoio/hugoTestModule
|