From d551159a5ad8da47cff89196f8484409864c04ca Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Mon, 21 Dec 2015 23:19:33 -0800 Subject: [PATCH 1/8] fix #24: hover hints are red not yellow This was an easy fix, but investigation led to other issues which also needed to be fixed. 1. The base problem was that the hover hint color for both "two" and "many" were wrong: many was yellow (instead of red) and "two" was green (!) (instead of yellow). This was easy to fix and was probably a typo in an earlier commit. 2. While investigating, it became clear the the select hint for "zero" had been omitted when the possibility of 0-value squares was introduced. So a red select hint for 0 was introduced. 3. Then an examination of the javascript code indicated that we never hint a square as having two values, even when there are no single-value, unassigned squares. This was a bug. So code was introduced to count the number of single-value, unassigned squares in the puzzle, and to update that count after an assignment. --- static/solver/puzzle.css | 7 ++++-- static/solver/puzzle.js | 48 +++++++++++++++++++++++++++++----------- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/static/solver/puzzle.css b/static/solver/puzzle.css index 5ba40bb..c9f8fbc 100644 --- a/static/solver/puzzle.css +++ b/static/solver/puzzle.css @@ -41,10 +41,10 @@ td[hover="one"]:hover { background-color: #99ff99; } td[hover="two"]:hover { - background-color: #99ff99; + background-color: #ffff99; } td[hover="many"]:hover { - background-color: #ffff99; + background-color: #ff6666; } td[hover="opaque"]:hover { background-color: #f1f6fd; @@ -53,6 +53,9 @@ td[hover="opaque"]:hover { td[selected="none"] { background-color: #a6bcdb; } +td[hover="zero"]:hover { + background-color: #ff6666; +} td[selected="one"] { background-color: #99ff99; } diff --git a/static/solver/puzzle.js b/static/solver/puzzle.js index d527ee5..46c5480 100644 --- a/static/solver/puzzle.js +++ b/static/solver/puzzle.js @@ -1,11 +1,12 @@ -var hoverHints; -var selectHints; -var guessHints; -var puzzleID; -var puzzleContent = null; -var puzzleErrors = null; -var guessContent = null; -var puzzleSideLength = 0; +var hoverHints; // are we giving hover hints? +var selectHints; // are we giving selection hints? +var guessHints; // are we giving guess hints? +var puzzleID; // puzzle's name +var boundCount = 0; // how many single-value-only unassigned squares are in the puzzle +var puzzleContent = null; // squares in the puzzle +var puzzleErrors = null; // errors in the puzzle +var guessContent = null; // allowed guess info for a selected square +var puzzleSideLength = 0; // side length of the puzzle var squaresURL = "/api/squares/"; var stateURL = "/api/state/"; var assignURL = "/api/assign/"; @@ -96,8 +97,15 @@ function LoadPuzzle(url) { function fillPuzzle(squares) { selectCell(null) - if (squares) + if (squares) { puzzleContent = squares; + boundCount = 0; + for (i = 0; i < puzzleContent.length; i++) { + if ("bval" in squares[i] || ("pvals" in squares[i] && squares[i].pvals.length == 1)) { + boundCount++; + } + } + } else puzzleContent = null; refillPuzzle(); @@ -116,8 +124,16 @@ function updatePuzzle(squares) { selectCell(null) if (squares && puzzleContent) { for (i = 0; i < squares.length; i++) { - if (squares[i].index > 0 && squares[i].index < puzzleContent.length) { - puzzleContent[squares[i].index-1] = squares[i] + if (squares[i].index > 0 && squares[i].index <= puzzleContent.length) { + var pcIdx = squares[i].index - 1; + var wasBound = "bval" in puzzleContent[pcIdx] || + ("pvals" in puzzleContent[pcIdx] && puzzleContent[pcIdx].pvals.length == 1); + var isBound = "bval" in squares[i] || + ("pvals" in squares[i] && squares[i].pvals.length == 1); + puzzleContent[squares[i].index-1] = squares[i]; + if (wasBound != isBound) { + if (wasBound) boundCount--; else boundCount++; + } } } } @@ -137,10 +153,16 @@ function refillPuzzle() { cell.setAttribute("hint", "one"); } else if ('pvals' in puzzleContent[pcIdx]) { cell.innerHTML = " "; - if (puzzleContent[pcIdx].pvals.length == 1) + plen = puzzleContent[pcIdx].pvals.length + if (plen == 1) cell.setAttribute("hint", "one"); - else + else if (boundCount > 0) { + cell.setAttribute("hint", "many"); + } else if (plen == 2) { + cell.setAttribute("hint", "two") + } else { cell.setAttribute("hint", "many"); + } } else { cell.innerHTML = "∅"; cell.setAttribute("hint", "zero"); From 6f1a44a1f74da3bbbe6233db0df5e5b69fda0a9d Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Sat, 26 Dec 2015 21:21:20 -0800 Subject: [PATCH 2/8] fix #29: release tagging in a separate file Actually releases are now done with environment variables and refer to Heroku releases. The Git release tags apply to the slug sources, but not to the full builds. Each page displays the Heroku release and instance data. --- client/settings.go | 14 ++-- client/template.go | 98 +++++++++++++++++++++------- client/testdata/TestErrorPage0.html | 5 +- client/testdata/TestHomePage0.html | 5 +- client/testdata/TestSolverPage0.html | 5 +- client/testdata/TestSolverPage1.html | 5 +- static/home/home.css | 9 +++ static/solver/puzzle.css | 9 +++ static/tmpl/errorPage.tmpl.html | 3 +- static/tmpl/homePage.tmpl.html | 3 + static/tmpl/solverPage.tmpl.html | 3 + 11 files changed, 126 insertions(+), 33 deletions(-) diff --git a/client/settings.go b/client/settings.go index e56c3e9..b04242c 100644 --- a/client/settings.go +++ b/client/settings.go @@ -16,16 +16,20 @@ Common client settings */ const ( - applicationName = "Sūsen" - applicationVersion = "0.7" - templatePageSuffix = "Page.tmpl.html" defaultTemplateDirectoryEnvVar = "TEMPLATE_DIRECTORY" defaultStaticDirectoryEnvVar = "STATIC_DIRECTORY" - iconPath = "/favicon.ico" - reportBugPath = "/bugreport.html" + templatePageSuffix = "Page.tmpl.html" + applicationNameEnvVar = "HEROKU_APP_NAME" + applicationVersionEnvVar = "HEROKU_RELEASE_VERSION" + applicationBuildEnvVar = "HEROKU_SLUG_COMMIT" + applicationInstanceEnvVar = "HEROKU_DYNO_ID" + applicationEnvEnvVar = "APPLICATION_ENVIRONMENT" ) var ( + brandName = "Sūsen" + iconPath = "/favicon.ico" + reportBugPath = "/bugreport.html" defaultStaticDirectory = "static" defaultTemplateDirectory = filepath.Join(defaultStaticDirectory, "tmpl") staticResourcePaths = map[string]string{ diff --git a/client/template.go b/client/template.go index e6bc4ec..c0f1246 100644 --- a/client/template.go +++ b/client/template.go @@ -5,6 +5,7 @@ import ( "fmt" "github.com/ancientHacker/susen.go/puzzle" "html/template" + "os" "path/filepath" ) @@ -19,13 +20,14 @@ solver pages // findSolverPageTemplate for template location details. var solverPageTemplate *template.Template -// A templateSolverPage contains the values to file the solver +// A templateSolverPage contains the values to fill the solver // page template. type templateSolverPage struct { SessionID, PuzzleID string Title, TopHead string IconFile, CssFile, JsFile string Puzzle templatePuzzle + ApplicationFooter string } // templatePuzzle is the structure expected by the puzzle grid @@ -65,14 +67,15 @@ func SolverPage(sessionID string, puzzleID string, state *puzzle.State) string { } tsp := templateSolverPage{ - SessionID: sessionID, - PuzzleID: puzzleID, - Title: fmt.Sprintf("%s: Solver", applicationName), - TopHead: fmt.Sprintf("%s v%s Puzzle Solver", applicationName, applicationVersion), - IconFile: iconPath, - CssFile: "/solver.css", - JsFile: "/solver.js", - Puzzle: tp, + SessionID: sessionID, + PuzzleID: puzzleID, + Title: fmt.Sprintf("%s: Solver", brandName), + TopHead: fmt.Sprintf("Puzzle Solver"), + IconFile: iconPath, + CssFile: "/solver.css", + JsFile: "/solver.js", + Puzzle: tp, + ApplicationFooter: applicationFooter(), } tmpl, err := loadPageTemplate("solver") @@ -239,16 +242,18 @@ error pages type templateErrorPage struct { Title, TopHead, Message string IconFile, ReportBugPage string + ApplicationFooter string } // return error page content func errorPage(e error) string { tep := templateErrorPage{ - Title: fmt.Sprintf("%s: Error", applicationName), - TopHead: fmt.Sprintf("%s v%s Error Page", applicationName, applicationVersion), - Message: e.Error(), - IconFile: iconPath, - ReportBugPage: reportBugPath, + Title: fmt.Sprintf("%s: Error", brandName), + TopHead: fmt.Sprintf("Error Page"), + Message: e.Error(), + IconFile: iconPath, + ReportBugPage: reportBugPath, + ApplicationFooter: applicationFooter(), } tmpl, err := loadPageTemplate("error") @@ -282,6 +287,7 @@ type templateHomePage struct { Title, TopHead string IconFile, CssFile, JsFile string PuzzleIDs []string + ApplicationFooter string } // add home statics to the static list @@ -296,14 +302,15 @@ func init() { // page content as a string. func HomePage(sessionID string, puzzleID string, puzzleIDs []string) string { tsp := templateHomePage{ - SessionID: sessionID, - PuzzleID: puzzleID, - Title: fmt.Sprintf("%s: Home", applicationName), - TopHead: fmt.Sprintf("%s v%s Home", applicationName, applicationVersion), - IconFile: iconPath, - CssFile: "/home.css", - JsFile: "/home.js", - PuzzleIDs: puzzleIDs, + SessionID: sessionID, + PuzzleID: puzzleID, + Title: fmt.Sprintf("%s: Home", brandName), + TopHead: fmt.Sprintf("%s", brandName), + IconFile: iconPath, + CssFile: "/home.css", + JsFile: "/home.js", + PuzzleIDs: puzzleIDs, + ApplicationFooter: applicationFooter(), } tmpl, err := loadPageTemplate("home") @@ -317,3 +324,50 @@ func HomePage(sessionID string, puzzleID string, puzzleIDs []string) string { } return buf.String() } + +/* + +application footer + +*/ + +// applicationFooter - the application footer that shows at the +// bottom of all pages. +func applicationFooter() string { + appName := os.Getenv(applicationNameEnvVar) + appVersion := os.Getenv(applicationVersionEnvVar) + appInstance := os.Getenv(applicationInstanceEnvVar) + appBuild := os.Getenv(applicationBuildEnvVar) + appEnv := os.Getenv(applicationEnvEnvVar) + + if appName == "" { + appName = brandName + } + + if appVersion == "" { + appVersion = " " + } else { + appVersion = " " + appVersion + } + + if len(appBuild) >= 7 { + appBuild = " " + appBuild[:7] + } else { + appBuild = "" + } + + if appEnv == "" { + appEnv = "local" + } + + if appInstance == "" { + appInstance = " " + } else { + if appEnv == "prd" { + appInstance = " <" + appInstance + ">" + } else { + appInstance = " <" + appEnv + appBuild + ">" + } + } + return "[" + appName + appVersion + appInstance + "]" +} diff --git a/client/testdata/TestErrorPage0.html b/client/testdata/TestErrorPage0.html index 6d7140a..956ebb5 100644 --- a/client/testdata/TestErrorPage0.html +++ b/client/testdata/TestErrorPage0.html @@ -5,9 +5,10 @@ -

Sūsen v0.7 Error Page

+

Error Page

Sorry, a server error has occurred while generating this page. The English description of the error is:

Test Error 0
-

To report this error, click here.

+

To report this error, click here. When reporting your error, please include the following build info:

+

[Sūsen <dev build> <local>]

diff --git a/client/testdata/TestHomePage0.html b/client/testdata/TestHomePage0.html index 60151ed..79ffc37 100644 --- a/client/testdata/TestHomePage0.html +++ b/client/testdata/TestHomePage0.html @@ -7,7 +7,7 @@ -

Sūsen v0.7 Home

+

Sūsen

@@ -39,5 +39,8 @@

Solve a Puzzle

+ diff --git a/client/testdata/TestSolverPage0.html b/client/testdata/TestSolverPage0.html index 120d753..04ba1bf 100644 --- a/client/testdata/TestSolverPage0.html +++ b/client/testdata/TestSolverPage0.html @@ -8,7 +8,7 @@ -

Sūsen v0.7 Puzzle Solver

+

Puzzle Solver

@@ -131,5 +131,8 @@

Sūsen v0.7 Puzzle Solver

+ diff --git a/client/testdata/TestSolverPage1.html b/client/testdata/TestSolverPage1.html index 0248220..583d467 100644 --- a/client/testdata/TestSolverPage1.html +++ b/client/testdata/TestSolverPage1.html @@ -8,7 +8,7 @@ -

Sūsen v0.7 Puzzle Solver

+

Puzzle Solver

@@ -421,5 +421,8 @@

Sūsen v0.7 Puzzle Solver

+ diff --git a/static/home/home.css b/static/home/home.css index ec2e2d4..61f9b05 100644 --- a/static/home/home.css +++ b/static/home/home.css @@ -35,3 +35,12 @@ background: #b8d1f3; margin-bottom: 12px } + +.footer { + position: absolute; + bottom: 2px; +} + +.footer p { + color: #b3b3b3; +} diff --git a/static/solver/puzzle.css b/static/solver/puzzle.css index c9f8fbc..82f7b5a 100644 --- a/static/solver/puzzle.css +++ b/static/solver/puzzle.css @@ -164,3 +164,12 @@ div[guess="maybe"] { .stepButton.warning:hover { background-color: #ff6666; } + +.footer { + position: absolute; + bottom: 2px; +} + +.footer p { + color: #b3b3b3; +} diff --git a/static/tmpl/errorPage.tmpl.html b/static/tmpl/errorPage.tmpl.html index 3d9d2c4..240d81e 100644 --- a/static/tmpl/errorPage.tmpl.html +++ b/static/tmpl/errorPage.tmpl.html @@ -8,6 +8,7 @@

{{.TopHead}}

Sorry, a server error has occurred while generating this page. The English description of the error is:

{{.Message}}
-

To report this error, click here.

+

To report this error, click here. When reporting your error, please include the following build info:

+

{{.ApplicationFooter}}

diff --git a/static/tmpl/homePage.tmpl.html b/static/tmpl/homePage.tmpl.html index 6437acc..8027531 100644 --- a/static/tmpl/homePage.tmpl.html +++ b/static/tmpl/homePage.tmpl.html @@ -39,5 +39,8 @@

Solve a Puzzle

+ diff --git a/static/tmpl/solverPage.tmpl.html b/static/tmpl/solverPage.tmpl.html index f45b1ac..24785c3 100644 --- a/static/tmpl/solverPage.tmpl.html +++ b/static/tmpl/solverPage.tmpl.html @@ -53,5 +53,8 @@

{{.TopHead}}

+ From a84860849f1747d5dee63e9fa3ab618b7c1ea24d Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Sat, 26 Dec 2015 21:37:43 -0800 Subject: [PATCH 3/8] update details of Heroku environment vars --- app.json | 1 + client/settings.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app.json b/app.json index 6c2ad9a..3894de1 100644 --- a/app.json +++ b/app.json @@ -5,6 +5,7 @@ }, "env": { "REDISTOGO_ENV": "dev" + "APPLICATION_ENV": "dev" }, "addons": [ "papertrail", diff --git a/client/settings.go b/client/settings.go index b04242c..2a72b7a 100644 --- a/client/settings.go +++ b/client/settings.go @@ -23,7 +23,7 @@ const ( applicationVersionEnvVar = "HEROKU_RELEASE_VERSION" applicationBuildEnvVar = "HEROKU_SLUG_COMMIT" applicationInstanceEnvVar = "HEROKU_DYNO_ID" - applicationEnvEnvVar = "APPLICATION_ENVIRONMENT" + applicationEnvEnvVar = "APPLICATION_ENV" ) var ( From 9821e12de65bd3e3bd6287265d5ba8c67fca1df0 Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Sat, 26 Dec 2015 21:49:03 -0800 Subject: [PATCH 4/8] more Heroku environment tweaking Unfortunately, it looks like labs features are not inherited to review apps. So at least I'm forcing the needed environment variables to be defined, although they are likely to use inherited rather than build-specific values. --- app.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app.json b/app.json index 3894de1..05aa023 100644 --- a/app.json +++ b/app.json @@ -6,6 +6,18 @@ "env": { "REDISTOGO_ENV": "dev" "APPLICATION_ENV": "dev" + "HEROKU_APP_NAME": { + "required": true + }, + "HEROKU_RELEASE_VERSION": { + "required": true + }, + "HEROKU_SLUG_COMMIT": { + "required": true + }, + "HEROKU_DYNO_ID": { + "required": true + } }, "addons": [ "papertrail", From 0047da0fc2ced8619126b070fbd58afa6bf85ece Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Sat, 26 Dec 2015 22:06:51 -0800 Subject: [PATCH 5/8] fix syntax error in app.json --- app.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index 05aa023..42badb9 100644 --- a/app.json +++ b/app.json @@ -4,8 +4,8 @@ "scripts": { }, "env": { - "REDISTOGO_ENV": "dev" - "APPLICATION_ENV": "dev" + "REDISTOGO_ENV": "dev", + "APPLICATION_ENV": "dev", "HEROKU_APP_NAME": { "required": true }, From 5b0f98ca9d2984d440a5c2980e89c4aa9727ed21 Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Sat, 26 Dec 2015 22:24:57 -0800 Subject: [PATCH 6/8] more Heroku environment fixes Don't require any vars except app name, which should always be available. Handle the "dev" (PR review) environment specially, by not expecting a release version or slug commit. --- app.json | 8 ++++---- client/template.go | 14 +++++++++----- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app.json b/app.json index 42badb9..bf379f6 100644 --- a/app.json +++ b/app.json @@ -7,16 +7,16 @@ "REDISTOGO_ENV": "dev", "APPLICATION_ENV": "dev", "HEROKU_APP_NAME": { - "required": true + "required": true, }, "HEROKU_RELEASE_VERSION": { - "required": true + "required": false, }, "HEROKU_SLUG_COMMIT": { - "required": true + "required": false, }, "HEROKU_DYNO_ID": { - "required": true + "required": false } }, "addons": [ diff --git a/client/template.go b/client/template.go index c0f1246..f166076 100644 --- a/client/template.go +++ b/client/template.go @@ -344,8 +344,16 @@ func applicationFooter() string { appName = brandName } + if appEnv == "" { + appEnv = "local" + } + if appVersion == "" { - appVersion = " " + if appEnv == "dev" { + appVersion = " " + } else { + appVersion = " " + } } else { appVersion = " " + appVersion } @@ -356,10 +364,6 @@ func applicationFooter() string { appBuild = "" } - if appEnv == "" { - appEnv = "local" - } - if appInstance == "" { appInstance = " " } else { From ef0cd1167ad3ea18c4da0bd6ff2b1433b3d37c96 Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Sat, 26 Dec 2015 22:28:01 -0800 Subject: [PATCH 7/8] Another JSON syntax fix...sigh. --- app.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.json b/app.json index bf379f6..07bd99d 100644 --- a/app.json +++ b/app.json @@ -7,13 +7,13 @@ "REDISTOGO_ENV": "dev", "APPLICATION_ENV": "dev", "HEROKU_APP_NAME": { - "required": true, + "required": true }, "HEROKU_RELEASE_VERSION": { - "required": false, + "required": false }, "HEROKU_SLUG_COMMIT": { - "required": false, + "required": false }, "HEROKU_DYNO_ID": { "required": false From 7ad55da975901452b6119104de0247eeae247926 Mon Sep 17 00:00:00 2001 From: Daniel Brotsky Date: Sun, 27 Dec 2015 00:29:45 -0800 Subject: [PATCH 8/8] Carefully work through footer messaging. - Made a careful choice about what to show in each environment. - Added tests. --- client/template.go | 38 ++++++++++------------- client/template_test.go | 46 ++++++++++++++++++++++++++++ client/testdata/TestErrorPage0.html | 2 +- client/testdata/TestHomePage0.html | 2 +- client/testdata/TestSolverPage0.html | 2 +- client/testdata/TestSolverPage1.html | 2 +- 6 files changed, 67 insertions(+), 25 deletions(-) diff --git a/client/template.go b/client/template.go index f166076..2234031 100644 --- a/client/template.go +++ b/client/template.go @@ -335,10 +335,10 @@ application footer // bottom of all pages. func applicationFooter() string { appName := os.Getenv(applicationNameEnvVar) + appEnv := os.Getenv(applicationEnvEnvVar) appVersion := os.Getenv(applicationVersionEnvVar) appInstance := os.Getenv(applicationInstanceEnvVar) appBuild := os.Getenv(applicationBuildEnvVar) - appEnv := os.Getenv(applicationEnvEnvVar) if appName == "" { appName = brandName @@ -348,30 +348,26 @@ func applicationFooter() string { appEnv = "local" } - if appVersion == "" { - if appEnv == "dev" { - appVersion = " " - } else { - appVersion = " " - } - } else { + if appVersion != "" { appVersion = " " + appVersion } - if len(appBuild) >= 7 { - appBuild = " " + appBuild[:7] - } else { - appBuild = "" + appBuild = appBuild[:7] } - if appInstance == "" { - appInstance = " " - } else { - if appEnv == "prd" { - appInstance = " <" + appInstance + ">" - } else { - appInstance = " <" + appEnv + appBuild + ">" - } + if appInstance != "" { + appInstance = " (dyno " + appInstance + ")" + } + + switch appEnv { + case "local": + return "[" + appName + " local]" + case "dev": + return "[" + appName + " CI/CD]" + case "stg": + return "[" + appName + appVersion + " <" + appBuild + ">]" + case "prd": + return "[" + appName + appVersion + " <" + appBuild + ">" + appInstance + "]" } - return "[" + appName + appVersion + appInstance + "]" + return "[" + appName + " ]" } diff --git a/client/template_test.go b/client/template_test.go index 846d3d2..9bdb705 100644 --- a/client/template_test.go +++ b/client/template_test.go @@ -83,6 +83,52 @@ func TestSolverPage(t *testing.T) { /* +footer + +*/ + +type footerTestcase struct { + name, version, instance, build, env string + footer string +} + +func TestApplicationFooter(t *testing.T) { + testcases := []footerTestcase{ + {"", "", "", "", "", + "[" + brandName + " local]"}, + {"susen-staging-pr-30", + "v29", + "", + "ca0fd7123f918d1b6d3e65f3de47d52db09ae068", + "dev", + "[susen-staging-pr-30 CI/CD]"}, + {"susen-staging", + "v29", + "1vac4117-c29f-4312-521e-ba4d8638c1ac", + "ca0fd7123f918d1b6d3e65f3de47d52db09ae068", + "stg", + "[susen-staging v29 ]"}, + {"susen-production", + "v22", + "1vac4117-c29f-4312-521e-ba4d8638c1ac", + "ca0fd7123f918d1b6d3e65f3de47d52db09ae068", + "prd", + "[susen-production v22 (dyno 1vac4117-c29f-4312-521e-ba4d8638c1ac)]"}, + } + for i, tc := range testcases { + os.Setenv(applicationNameEnvVar, tc.name) + os.Setenv(applicationVersionEnvVar, tc.version) + os.Setenv(applicationInstanceEnvVar, tc.instance) + os.Setenv(applicationBuildEnvVar, tc.build) + os.Setenv(applicationEnvEnvVar, tc.env) + if footer := applicationFooter(); footer != tc.footer { + t.Errorf("Case %d: got %q, expected %q", i, footer, tc.footer) + } + } +} + +/* + helpers */ diff --git a/client/testdata/TestErrorPage0.html b/client/testdata/TestErrorPage0.html index 956ebb5..4734276 100644 --- a/client/testdata/TestErrorPage0.html +++ b/client/testdata/TestErrorPage0.html @@ -9,6 +9,6 @@

Error Page

Sorry, a server error has occurred while generating this page. The English description of the error is:

Test Error 0

To report this error, click here. When reporting your error, please include the following build info:

-

[Sūsen <dev build> <local>]

+

[Sūsen local]

diff --git a/client/testdata/TestHomePage0.html b/client/testdata/TestHomePage0.html index 79ffc37..b37bc66 100644 --- a/client/testdata/TestHomePage0.html +++ b/client/testdata/TestHomePage0.html @@ -40,7 +40,7 @@

Solve a Puzzle

diff --git a/client/testdata/TestSolverPage0.html b/client/testdata/TestSolverPage0.html index 04ba1bf..0563f66 100644 --- a/client/testdata/TestSolverPage0.html +++ b/client/testdata/TestSolverPage0.html @@ -132,7 +132,7 @@

Puzzle Solver

diff --git a/client/testdata/TestSolverPage1.html b/client/testdata/TestSolverPage1.html index 583d467..e8fb808 100644 --- a/client/testdata/TestSolverPage1.html +++ b/client/testdata/TestSolverPage1.html @@ -422,7 +422,7 @@

Puzzle Solver