Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2021-11-07 18:06:48 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-12-02 18:30:53 +0300
commit58adbeef88ea5c8769d12ba27eef2d89bdf575eb (patch)
treea680cf2e48d1c9f59bc55e9be59f7670ed7d801b /hugolib
parent93572e53181b5a614c2874bd00b7a38a02de58d3 (diff)
Validate private use language tags
Fixes #9119
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/hugo_modules_test.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/hugolib/hugo_modules_test.go b/hugolib/hugo_modules_test.go
index ff3d01c04..464230437 100644
--- a/hugolib/hugo_modules_test.go
+++ b/hugolib/hugo_modules_test.go
@@ -701,10 +701,13 @@ Data: {{ .Site.Data }}
createSymlinks := func(baseDir, id string) {
for _, dir := range files.ComponentFolders {
- c.Assert(os.Chdir(filepath.Join(baseDir, dir)), qt.IsNil)
- c.Assert(os.Symlink("real", fmt.Sprintf("realsym%s", id)), qt.IsNil)
- c.Assert(os.Chdir(filepath.Join(baseDir, dir, "real")), qt.IsNil)
- c.Assert(os.Symlink("data.toml", fmt.Sprintf(filepath.FromSlash("datasym%s.toml"), id)), qt.IsNil)
+ // Issue #9119: private use language tags cannot exceed 8 characters.
+ if dir != "i18n" {
+ c.Assert(os.Chdir(filepath.Join(baseDir, dir)), qt.IsNil)
+ c.Assert(os.Symlink("real", fmt.Sprintf("realsym%s", id)), qt.IsNil)
+ c.Assert(os.Chdir(filepath.Join(baseDir, dir, "real")), qt.IsNil)
+ c.Assert(os.Symlink("data.toml", fmt.Sprintf(filepath.FromSlash("datasym%s.toml"), id)), qt.IsNil)
+ }
}
}