aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-busted/fix-tests.patch
blob: 365c9c48ce4072d5a4c77f06a0eb5cae552fecdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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)