]> Cypherpunks repositories - gostls13.git/commitdiff
exp/norm: It is important that the unicode versions of the various packages align.
authorMarcel van Lohuizen <mpvl@golang.org>
Mon, 7 May 2012 09:41:40 +0000 (11:41 +0200)
committerMarcel van Lohuizen <mpvl@golang.org>
Mon, 7 May 2012 09:41:40 +0000 (11:41 +0200)
Replace hard-coded version strings with unicode.Version.

R=r, r
CC=golang-dev
https://golang.org/cl/6163045

src/pkg/exp/norm/maketables.go
src/pkg/exp/norm/normregtest.go

index 35d42c1ab5125d2ef69345d35bd66093a30992d9..8ac64ba967df2695f8ab6a2e7a851b6a737e36d6 100644 (file)
@@ -23,6 +23,7 @@ import (
        "sort"
        "strconv"
        "strings"
+       "unicode"
 )
 
 func main() {
@@ -38,7 +39,7 @@ func main() {
 }
 
 var url = flag.String("url",
-       "http://www.unicode.org/Public/6.0.0/ucd/",
+       "http://www.unicode.org/Public/"+unicode.Version+"/ucd/",
        "URL of Unicode database directory")
 var tablelist = flag.String("tables",
        "all",
index 507de1ae8340bed21f5aeb91285a569bb2189276..6d2188498b105de5561fcb4ff8dcacd66cb88f16 100644 (file)
@@ -22,6 +22,7 @@ import (
        "strconv"
        "strings"
        "time"
+       "unicode"
        "unicode/utf8"
 )
 
@@ -39,7 +40,7 @@ func main() {
 const file = "NormalizationTest.txt"
 
 var url = flag.String("url",
-       "http://www.unicode.org/Public/6.0.0/ucd/"+file,
+       "http://www.unicode.org/Public/"+unicode.Version+"/ucd/"+file,
        "URL of Unicode database directory")
 var localFiles = flag.Bool("local",
        false,
@@ -48,7 +49,7 @@ var localFiles = flag.Bool("local",
 var logger = log.New(os.Stderr, "", log.Lshortfile)
 
 // This regression test runs the test set in NormalizationTest.txt
-// (taken from http://www.unicode.org/Public/6.0.0/ucd/).
+// (taken from http://www.unicode.org/Public/<unicode.Version>/ucd/).
 //
 // NormalizationTest.txt has form:
 // @Part0 # Specific cases