summaryrefslogtreecommitdiffstats
path: root/helpers/hugo_test.go
diff options
context:
space:
mode:
authorbep <bjorn.erik.pedersen@gmail.com>2015-03-18 12:23:13 +0100
committerbep <bjorn.erik.pedersen@gmail.com>2015-03-18 12:23:13 +0100
commit3273fce044f06f90ae296f9b42431958d2b06e7f (patch)
tree4556f7b1c7ffa73d53d3d5d08214999c095868c7 /helpers/hugo_test.go
parent49f20bbc9bf4eb9ecedfa0fd9dde484256ae91d1 (diff)
Refactor Hugo version
Put version handling into the helpers package so it can be used by many, and split version and suffix to make it possible to calculate the next Hugo version.
Diffstat (limited to 'helpers/hugo_test.go')
-rw-r--r--helpers/hugo_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/helpers/hugo_test.go b/helpers/hugo_test.go
new file mode 100644
index 000000000..90b63d403
--- /dev/null
+++ b/helpers/hugo_test.go
@@ -0,0 +1,11 @@
+package helpers
+
+import (
+ "github.com/stretchr/testify/assert"
+ "testing"
+)
+
+func TestHugoVersion(t *testing.T) {
+ assert.Equal(t, "0.15-DEV", hugoVersion(0.15, "-DEV"))
+ assert.Equal(t, "0.17", hugoVersionNoSuffix(0.16+0.01))
+}