Skip to content

Commit

Permalink
cmd/testscript: Add tests for --latest flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed May 26, 2024
1 parent bb2a65d commit a389db4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
File renamed without changes.
13 changes: 13 additions & 0 deletions cmd/testscripts/install/install_latest.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# User cache and config dirs (we use os.UserCacheDir and os.UserCongfigDir)
[darwin] env HOME=home
[darwin] mkdir "$HOME/Library/Caches"
[darwin] mkdir "$HOME/Library/Application Support"
[linux] env XDG_CACHE_HOME=cache
[linux] env XDG_CONFIG_HOME=config
[windows] env LocalAppData=cache
[windows] env AppData=config

# Test
exec hvm install --latest
stdout 'Downloading v.* done.\n'
stdout 'Installation of v.* complete.\n'
12 changes: 12 additions & 0 deletions cmd/testscripts/use/use_latest.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# User cache and config dirs (we use os.UserCacheDir and os.UserCongfigDir)
[darwin] env HOME=home
[darwin] mkdir "$HOME/Library/Caches"
[darwin] mkdir "$HOME/Library/Application Support"
[linux] env XDG_CACHE_HOME=cache
[linux] env XDG_CONFIG_HOME=config
[windows] env LocalAppData=cache
[windows] env AppData=config

# Test
exec hvm use --latest
stdout 'Downloading v.* done.\n'

0 comments on commit a389db4

Please sign in to comment.