summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-06-08 07:55:42 +0900
committerGitHub <noreply@github.com>2021-06-08 07:55:42 +0900
commitfaab5052f8d21ed06352b185d52c5a3e177b904e (patch)
treefc267a02e2d0e560d6b11627e4c4d397c2b60ca4
parentf2627aa60394b2d296dab1afdca6f648126ff1c3 (diff)
parent542cf9754f836024e1b4ebb62636120e6962be2e (diff)
downloadpsych-faab5052f8d21ed06352b185d52c5a3e177b904e.zip
Merge pull request #506 from mame/ci-with-libyaml-0.1.7
Add a CI configuration with libyaml 0.1.7
-rw-r--r--.github/workflows/libyaml-0.1.7.yml35
-rw-r--r--test/psych/test_psych.rb2
2 files changed, 36 insertions, 1 deletions
diff --git a/.github/workflows/libyaml-0.1.7.yml b/.github/workflows/libyaml-0.1.7.yml
new file mode 100644
index 0000000..d905619
--- /dev/null
+++ b/.github/workflows/libyaml-0.1.7.yml
@@ -0,0 +1,35 @@
+name: libyaml-0.1.7
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ruby: [ ruby-head, "3.0", 2.7, 2.6, 2.5, 2.4 ]
+ steps:
+ - name: Install libraries
+ run: sudo apt install haveged
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: ${{ matrix.ruby }}
+ - name: Set up libyaml 0.1.7
+ run: |
+ wget https://pyyaml.org/download/libyaml/yaml-0.1.7.tar.gz
+ tar xzf yaml-0.1.7.tar.gz
+ cd yaml-0.1.7
+ ./configure --prefix=/tmp/local
+ make
+ make install
+ - name: Install dependencies
+ run: bundle install
+ - name: Compile
+ run: rake compile -- --with-libyaml-dir=/tmp/local
+ - name: Run test
+ run: rake
+ - name: Install gem
+ run: rake install
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb
index bd271f2..1abd69c 100644
--- a/test/psych/test_psych.rb
+++ b/test/psych/test_psych.rb
@@ -424,7 +424,7 @@ eoyml
end
assert_equal "Tried to dump unspecified class: Symbol(:foo)", error.message
- assert_equal "--- :foo\n", Psych.safe_dump(:foo, permitted_classes: [Symbol], permitted_symbols: [:foo])
+ assert_match(/\A--- :foo\n(?:\.\.\.\n)?\z/, Psych.safe_dump(:foo, permitted_classes: [Symbol], permitted_symbols: [:foo]))
end
def test_safe_dump_aliases