]> Cypherpunks repositories - gostls13.git/commitdiff
codelab/wiki: fix build
authorRuss Cox <rsc@golang.org>
Wed, 26 Jan 2011 17:54:07 +0000 (12:54 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 26 Jan 2011 17:54:07 +0000 (12:54 -0500)
TBR=adg
CC=golang-dev
https://golang.org/cl/4077045

doc/codelab/wiki/test.sh
doc/codelab/wiki/test_edit.good

index 5b752fe3c23bb2cd2f949190c4756bd43b51643b..5aad5704f121b5697c3e9ec570e74ad903af7408 100755 (executable)
@@ -1,4 +1,4 @@
-#1/bin/bash
+#!/bin/bash
 
 ./final.bin &
 wiki_pid=$!
@@ -13,11 +13,11 @@ trap cleanup INT
 sleep 1
 
 curl -s -o test_edit.out http://localhost:8080/edit/Test 
-cmp test_edit.out test_edit.good || cleanup 1
+diff -u test_edit.out test_edit.good || cleanup 1
 curl -s -o /dev/null -d body=some%20content http://localhost:8080/save/Test
-cmp Test.txt test_Test.txt.good || cleanup 1
+diff -u Test.txt test_Test.txt.good || cleanup 1
 curl -s -o test_view.out http://localhost:8080/view/Test
-cmp test_view.out test_view.good || cleanup 1
+diff -u test_view.out test_view.good || cleanup 1
 
 echo "Passed"
 cleanup 0
index e4edf8cb237b1c6c51b5dca316302ee3caf4ea49..36c6dbb7322509dc35995a17b139ba884a3567fd 100644 (file)
@@ -1,6 +1,6 @@
 <h1>Editing Test</h1>
 
 <form action="/save/Test" method="POST">
-<div><textarea name="Body" rows="20" cols="80"></textarea></div>
+<div><textarea name="body" rows="20" cols="80"></textarea></div>
 <div><input type="submit" value="Save"></div>
 </form>