Added simple test script

This commit is contained in:
Hiroshi SHIBATA 2023-12-16 15:55:45 +08:00
parent 83bdf127b8
commit ad2a38dce4
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2
2 changed files with 32 additions and 19 deletions

View File

@ -1,21 +1,3 @@
This directory contains tests for the bundled gems warning under the Bundler.
## Warning cases
test_warn_bundled_gems.rb:
test_warn_dependency.rb:
test_warn_dash_gem.rb:
$ ruby test_warn_dash_gem.rb
test_warn_bundle_exec.rb:
$ bundle exec ruby test_warn_bundle_exec.rb
test_warn_bundle_exec_shebang.rb:
$ bundle exec ./test_warn_bundle_exec_shebang.rb
## Not warning cases
test_no_warn_dash_gem.rb:
test_no_warn_bootsnap.rb:
test_no_warn_dependency.rb:
$ ruby test_no_warn_dash_gem.rb
see [test.sh](./test.sh) for details.

View File

@ -0,0 +1,31 @@
#!/bin/bash
echo "* Show warning require and LoadError"
ruby test_warn_bundled_gems.rb
echo "* Show warning when bundled gems called as dependency"
ruby test_warn_dependency.rb
echo "* Show warning sub-feature like bigdecimal/util"
ruby test_warn_sub_feature.rb
echo "* Show warning dash gem like net/smtp"
ruby test_warn_dash_gem.rb
echo "* Show warning when bundle exec with ruby and script"
bundle exec ruby test_warn_bundle_exec.rb
echo "* Show warning when bundle exec with shebang's script"
bundle exec ./test_warn_bundle_exec_shebang.rb
echo "* Don't show warning bundled gems on Gemfile"
ruby test_no_warn_dependency.rb
echo "* Don't show warning with bootsnap"
ruby test_no_warn_bootsnap.rb
echo "* Don't show warning with net/smtp when net-smtp on Gemfile"
ruby test_no_warn_dash_gem.rb
echo "* Don't show warning bigdecimal/util when bigdecimal on Gemfile"
ruby test_no_warn_sub_feature.rb