]> Nishi Git Mirror - aya.git/commitdiff
Fix tests
authorJames Mills <1290234+prologic@users.noreply.github.com>
Thu, 16 Mar 2023 08:20:30 +0000 (18:20 +1000)
committerJames Mills <1290234+prologic@users.noreply.github.com>
Thu, 16 Mar 2023 08:20:30 +0000 (18:20 +1000)
go.mod
go.sum
testdata/extensions/.test/index.html
testdata/ignore/.test/index.html
testdata/simple/.test/index.html
testdata/update [new file with mode: 0755]
testdata/variables/.test/index.html

diff --git a/go.mod b/go.mod
index ef558d1f19189790a3eec87d2091700deab418ab..88860df8a31d050792fbd7bfa5fbf19324bd7497 100644 (file)
--- a/go.mod
+++ b/go.mod
@@ -6,6 +6,7 @@ require (
        github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
        github.com/sirupsen/logrus v1.9.0
        github.com/spf13/cobra v1.6.1
+       github.com/stretchr/testify v1.8.1
        github.com/yuin/goldmark v1.5.4
        go.mills.io/static v0.0.0-20230316074605-51908d346ffc
        golang.org/x/sync v0.1.0
@@ -15,12 +16,14 @@ require (
 require (
        github.com/NYTimes/gziphandler v1.1.1 // indirect
        github.com/cyphar/filepath-securejoin v0.2.3 // indirect
+       github.com/davecgh/go-spew v1.1.1 // indirect
        github.com/inconshreveable/mousetrap v1.1.0 // indirect
        github.com/julienschmidt/httprouter v1.3.0 // indirect
        github.com/kr/pretty v0.3.0 // indirect
+       github.com/pmezard/go-difflib v1.0.0 // indirect
        github.com/spf13/pflag v1.0.5 // indirect
-       github.com/stretchr/testify v1.8.1 // indirect
        github.com/unrolled/logger v0.0.0-20201216141554-31a3694fe979 // indirect
        golang.org/x/sys v0.6.0 // indirect
        gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
+       gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index bff23abe5cdc3b994e1036a3e3a0b21e2c327d97..499392fa990ab68e3fe1cd6c501e6b0ca78da714 100644 (file)
--- a/go.sum
+++ b/go.sum
@@ -7,7 +7,6 @@ github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxG
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
 github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
 github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
@@ -47,16 +46,12 @@ github.com/unrolled/logger v0.0.0-20201216141554-31a3694fe979 h1:47+K4wN0S8L3fUw
 github.com/unrolled/logger v0.0.0-20201216141554-31a3694fe979/go.mod h1:X5DBNY1yIVkuLwJP3BXlCoQCa5mGg7hPJPIA0Blwc44=
 github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU=
 github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-go.mills.io/static v0.0.0-20230312034046-6dff09caed3b h1:9mSSHQJztO83b4939B31Z8bCOlvQUei6bRhnJq8eRC0=
-go.mills.io/static v0.0.0-20230312034046-6dff09caed3b/go.mod h1:TmaEDwM+IgrCRyMxtVWtmSdoxLP3N6ehBa7AiOZj2Mk=
 go.mills.io/static v0.0.0-20230316074605-51908d346ffc h1:BMeFNGUZAQCfgo8DxUKxgGNrXQa1KglS5gZ4Kn5fUsQ=
 go.mills.io/static v0.0.0-20230316074605-51908d346ffc/go.mod h1:TmaEDwM+IgrCRyMxtVWtmSdoxLP3N6ehBa7AiOZj2Mk=
 golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
-golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
 golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
index 8ac7456172c88dc566264e637d5d8c6ec854cae3..7dc7db444dacdcdfa49f3bb2aadd9076717e16f1 100644 (file)
@@ -3,7 +3,6 @@
                <title>Hello World</title>
        </head>
        <body><h1 id="hello-world">Hello World</h1>
-
 <p>Hello World!</p>
 </body>
 </html>
index 69131fa9f27338fae995d872261ab01549bcfa72..80b5a0dfb8c77882ec0449b5e13725180eed9c18 100644 (file)
@@ -1,6 +1,5 @@
 <html>
        <body><h1 id="simple">Simple</h1>
-
 <p>Simple page</p>
 </body>
 </html>
index 69131fa9f27338fae995d872261ab01549bcfa72..80b5a0dfb8c77882ec0449b5e13725180eed9c18 100644 (file)
@@ -1,6 +1,5 @@
 <html>
        <body><h1 id="simple">Simple</h1>
-
 <p>Simple page</p>
 </body>
 </html>
diff --git a/testdata/update b/testdata/update
new file mode 100755 (executable)
index 0000000..a89e958
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e
+
+for d in *; do
+  if [ -d "$d" ]; then
+    pushd "$d" || exit 1
+    rm -rf .pub .test
+    zs build
+    mv .pub .test
+    popd || exit 1
+  fi
+done
index e3eee52a7bbe04c2f0726f9ed39b68efe79e6e07..9307c9873800dc9693482946543538c4c1b3d952 100644 (file)
@@ -3,7 +3,6 @@
                <title>Simple</title>
        </head>
        <body><h1 id="simple">Simple</h1>
-
 <p>Simple page</p>
 </body>
 </html>