Skip to content

Commit

Permalink
Merge pull request #1 from k0kubun/github-actions
Browse files Browse the repository at this point in the history
Maintain GitHub Actions
  • Loading branch information
k0kubun committed Jan 20, 2021
2 parents f3c0175 + 2ca189c commit b721d4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ jobs:
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
strategy:
matrix:
ruby: [ 2.7, 2.6, 2.5, head ]
os: [ ubuntu-latest, macos-latest ]
ruby:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- head
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
Expand Down
3 changes: 3 additions & 0 deletions test/erb/test_erb_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@

class TestErbCommand < Test::Unit::TestCase
def test_var
pend 'this test has not supported Ruby 2.5' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
assert_in_out_err(["-w",
File.expand_path("../../../libexec/erb", __FILE__),
"var=hoge"],
"<%=var%>", ["hoge"])
end

def test_template_file_encoding
pend 'this test has not supported Ruby 2.5' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
assert_in_out_err(["-w",
File.expand_path("../../../libexec/erb", __FILE__)],
"<%=''.encoding.to_s%>", ["UTF-8"])
end

# These interfaces will be removed at Ruby 2.7.
def test_deprecated_option
pend 'this test has not supported Ruby 2.5' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
warnings = [
"warning: -S option of erb command is deprecated. Please do not use this.",
/\n.+\/libexec\/erb:\d+: warning: Passing safe_level with the 2nd argument of ERB\.new is deprecated\. Do not use it, and specify other arguments as keyword arguments\.\n/,
Expand Down

0 comments on commit b721d4b

Please sign in to comment.