summaryrefslogtreecommitdiffstats
path: root/testscripts/commands/new.txt
diff options
context:
space:
mode:
Diffstat (limited to 'testscripts/commands/new.txt')
-rw-r--r--testscripts/commands/new.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/testscripts/commands/new.txt b/testscripts/commands/new.txt
new file mode 100644
index 000000000..11fe753b9
--- /dev/null
+++ b/testscripts/commands/new.txt
@@ -0,0 +1,27 @@
+# Test the new command.
+
+hugo new site -h
+stdout 'Create a new site in the provided directory'
+hugo new site mysite
+stdout 'Congratulations! Your new Hugo site is created in'
+cd mysite
+checkfile hugo.toml
+
+hugo new theme -h
+stdout 'Create a new site in the provided directory'
+hugo new theme mytheme
+stdout 'Creating theme'
+cd themes
+cd mytheme
+checkfile theme.toml
+checkfile hugo.toml
+exists layouts/_default/list.html
+exists layouts/_default/single.html
+
+cd $WORK/mysite
+
+hugo new -h
+stdout 'Create a new content file.'
+hugo new posts/my-first-post.md
+checkfile content/posts/my-first-post.md
+