diff options
Diffstat (limited to 'community/lua-busted/fix-tests.patch')
-rw-r--r-- | community/lua-busted/fix-tests.patch | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/community/lua-busted/fix-tests.patch b/community/lua-busted/fix-tests.patch new file mode 100644 index 0000000000..365c9c48ce --- /dev/null +++ b/community/lua-busted/fix-tests.patch @@ -0,0 +1,92 @@ +From ed3f70805ac0e30bf14f6a5850e873329f5e337c Mon Sep 17 00:00:00 2001 +From: Oscar Lim <olim@ucla.edu> +Date: Mon, 29 Aug 2016 11:54:59 -0700 +Subject: [PATCH] Fix failing tests after penlight upgrade + +This fixes failing unit tests after upgrading `penlight`. Apparently, +the new version of `penlight` uses `pl.List` internally when traversing +a directory. Hence, we cannot use `pl.List` in any of the insulation +tests. + +Alpine notes: + This patch is backported from upstream. +--- + spec/insulate-expose_spec.lua | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/spec/insulate-expose_spec.lua b/spec/insulate-expose_spec.lua +index 0409a3d..bba84bd 100644 +--- a/spec/insulate-expose_spec.lua ++++ b/spec/insulate-expose_spec.lua +@@ -13,9 +13,9 @@ describe('Tests insulation', function() + + it('updates package.loaded', function() + assert.is_not_nil(pl) +- assert.is_not_nil(List) ++ assert.is_not_nil(Date) + assert.is_not_nil(package.loaded.pl) +- assert.is_not_nil(package.loaded['pl.List']) ++ assert.is_not_nil(package.loaded['pl.Date']) + end) + end) + +@@ -27,9 +27,9 @@ describe('Tests insulation', function() + + it('restores package.loaded', function() + assert.is_nil(pl) +- assert.is_nil(List) ++ assert.is_nil(Date) + assert.is_nil(package.loaded.pl) +- assert.is_nil(package.loaded['pl.List']) ++ assert.is_nil(package.loaded['pl.Date']) + end) + end) + end) +@@ -54,9 +54,9 @@ insulate('', function() + + it('updates package.loaded', function() + assert.is_not_nil(pl) +- assert.is_not_nil(List) ++ assert.is_not_nil(Date) + assert.is_not_nil(package.loaded.pl) +- assert.is_not_nil(package.loaded['pl.List']) ++ assert.is_not_nil(package.loaded['pl.Date']) + end) + end) + end) +@@ -74,9 +74,9 @@ insulate('', function() + + it('does not restore package.loaded', function() + assert.is_not_nil(pl) +- assert.is_not_nil(List) ++ assert.is_not_nil(Date) + assert.is_not_nil(package.loaded.pl) +- assert.is_not_nil(package.loaded['pl.List']) ++ assert.is_not_nil(package.loaded['pl.Date']) + end) + end) + end) +@@ -93,9 +93,9 @@ insulate('', function() + end) + + it('Tests package.loaded persists without insulate', function() +- assert.is_not_nil(List) ++ assert.is_not_nil(Date) + assert.is_not_nil(package.loaded.pl) +- assert.is_not_nil(package.loaded['pl.List']) ++ assert.is_not_nil(package.loaded['pl.Date']) + end) + end) + +@@ -107,9 +107,9 @@ describe('Tests after insulating an expose block', function() + + it('restores package.loaded', function() + assert.is_nil(pl) +- assert.is_nil(List) ++ assert.is_nil(Date) + assert.is_nil(package.loaded.pl) +- assert.is_nil(package.loaded['pl.List']) ++ assert.is_nil(package.loaded['pl.Date']) + end) + end) + |