Skip to content

Commit

Permalink
cmd: Add test cases for sortAscending
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Sep 19, 2023
1 parent ea50f29 commit 5fe8e2a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions cmd/hvm/testscripts/use_check_sort_order.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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

# https://github.com/actions/runner-images/issues/602
[darwin] skip

# Test 1
env HVM_NUMTAGSTODISPLAY=-1
env HVM_SORTASCENDING=true
exec hvm use
stdin input.txt
stdout '\D1\) v0\.54\.0'

env HVM_NUMTAGSTODISPLAY=-1
env HVM_SORTASCENDING=false
stdin input.txt
exec hvm use
! stdout '\D1\) v0\.54\.0'

env HVM_NUMTAGSTODISPLAY=30
env HVM_SORTASCENDING=false
stdin input.txt
exec hvm use
! stdout '\D1\) v0\.54\.0'
! stdout '\D30\) v0\.54\.0'

# Files
-- input.txt --
1

0 comments on commit 5fe8e2a

Please sign in to comment.