[DRE-commits] [ruby-liquid] 02/03: add upstream patch to fix test failure for unusual timezones
Cédric Boutillier
boutil at moszumanska.debian.org
Thu Jul 23 21:12:24 UTC 2015
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-liquid.
commit 6f378a0252f432aea0735c8caccd1d92fda8b488
Author: Cédric Boutillier <boutil at debian.org>
Date: Thu Jul 23 22:41:41 2015 +0200
add upstream patch to fix test failure for unusual timezones
---
debian/patches/series | 1 +
debian/patches/timezone_test_failure.patch | 42 ++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index 3766f60..7d3345a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
no_relative_path_in_require.patch
+timezone_test_failure.patch
diff --git a/debian/patches/timezone_test_failure.patch b/debian/patches/timezone_test_failure.patch
new file mode 100644
index 0000000..1f0b124
--- /dev/null
+++ b/debian/patches/timezone_test_failure.patch
@@ -0,0 +1,42 @@
+Description: Fix a timezone test failure.
+Author: Dylan Thacker-Smith <Dylan.Smith at shopify.com>
+Origin: upstream,https://github.com/Shopify/liquid/commit/cd0c5e954cef2ae3f03cfab88726c16e2b6741db.patch
+Reviewed-By: Cédric Boutillier <boutil at debian.org>
+Bug: https://github.com/Shopify/liquid/issues/630
+Bug-Debian: https://bugs.debian.org/788694
+Last-Update: 2015-07-23
+
+---
+ test/integration/standard_filter_test.rb | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+--- a/test/integration/standard_filter_test.rb
++++ b/test/integration/standard_filter_test.rb
+@@ -252,8 +252,10 @@
+
+ assert_equal nil, @filters.date(nil, "%B")
+
+- assert_equal "07/05/2006", @filters.date(1152098955, "%m/%d/%Y")
+- assert_equal "07/05/2006", @filters.date("1152098955", "%m/%d/%Y")
++ with_timezone("UTC") do
++ assert_equal "07/05/2006", @filters.date(1152098955, "%m/%d/%Y")
++ assert_equal "07/05/2006", @filters.date("1152098955", "%m/%d/%Y")
++ end
+ end
+
+ def test_first_last
+@@ -376,4 +378,14 @@
+ def test_cannot_access_private_methods
+ assert_template_result('a',"{{ 'a' | to_number }}")
+ end
++
++ private
++
++ def with_timezone(tz)
++ old_tz = ENV['TZ']
++ ENV['TZ'] = tz
++ yield
++ ensure
++ ENV['TZ'] = old_tz
++ end
+ end # StandardFiltersTest
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-liquid.git
More information about the Pkg-ruby-extras-commits
mailing list