HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/src/rvm/rvm-test/fast/rvm-shell_comment_test.sh
source "$rvm_path/scripts/rvm"

: prepare
d=${TMPDIR:=/tmp}/test-rvm-shell/ # status=0
mkdir -p $d                       # status=0
echo "rvm current" > $d/rvm-shell-rvm-current-script.sh # status=0
chmod +x $d/rvm-shell-rvm-current-script.sh
rvm use 2.3.4 --install
rvm use system

: Test1
echo "rvm use 2.3.4@acme --create" > $d/.rvmrc     # status=0
ls -ld $d/.rvmrc
rvm rvmrc trust $d/.rvmrc                               # status=0
rvm $d do rvm current                                   # match=/ruby-2.3.4@acme/
rvm-shell --path $d -c "rvm current"                    # match=/ruby-2.3.4@acme/
rvm $d do $d/rvm-shell-rvm-current-script.sh            # match=/ruby-2.3.4@acme/
rvm-shell --path $d $d/rvm-shell-rvm-current-script.sh  # match=/ruby-2.3.4@acme/
rvm use $d                                              # env[GEM_HOME]=/ruby-2.3.4@acme$/
rvm use system

: Test2
echo "rvm 2.3.4@acme --create" > $d/.rvmrc         # status=0
ls -ld $d/.rvmrc
rvm rvmrc trust $d/.rvmrc                               # status=0
rvm $d do rvm current                                   # match=/ruby-2.3.4@acme/
rvm-shell --path $d -c "rvm current"                    # match=/ruby-2.3.4@acme/
rvm $d do $d/rvm-shell-rvm-current-script.sh            # match=/ruby-2.3.4@acme/
rvm-shell --path $d $d/rvm-shell-rvm-current-script.sh  # match=/ruby-2.3.4@acme/
rvm $d                                                  # env[GEM_HOME]=/ruby-2.3.4@acme$/

: Cleaning
rm -rf $d # status=0