File tree 4 files changed +43
-0
lines changed
4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 87
87
echo.%GIT_REF_TAG% | findstr /C:"%target_ruby%">nul || (echo stop build not required for release & (exit 1))
88
88
)
89
89
90
+ - name : enable long paths on OS level
91
+ shell : powershell
92
+ # https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell
93
+ run : New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
94
+
90
95
- name : ensure bundler is installed on the build ruby
91
96
run : gem install bundler --conservative --no-doc
92
97
Original file line number Diff line number Diff line change 10
10
- IF DEFINED DEPLOY_TAG (
11
11
echo.%DEPLOY_TAG% | findstr /C:"%target_ruby%">nul || (echo stop build not required for release & (exit 1))
12
12
)
13
+ # enable long paths on OS level:
14
+ # https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell
15
+ - powershell New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
13
16
14
17
install :
15
18
# Avoid repo.msys2.org since it's down currently
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ end.each do |destpath|
35
35
image = File . binread ( t . prerequisites . first )
36
36
# The XML elements we want to add to the default MINGW manifest:
37
37
new = <<-EOT
38
+ <application xmlns="urn:schemas-microsoft-com:asm.v3">
39
+ <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
40
+ <ws2:longPathAware>true</ws2:longPathAware>
41
+ </windowsSettings>
42
+ </application>
38
43
<dependency>
39
44
<dependentAssembly>
40
45
<assemblyIdentity version="1.0.0.0" type="win32" name="ruby_builtin_dlls" />
Original file line number Diff line number Diff line change
1
+ #frozen_string_literal: true
2
+ require "minitest/autorun"
3
+ require "tmpdir"
4
+
5
+ class TestStdlib < Minitest ::Test
6
+ LONG_PATH = Dir . mktmpdir ( "0123456789" *15 )
7
+
8
+ def test_mkdir
9
+ n = File . join ( LONG_PATH , "c" *150 )
10
+ Dir . mkdir n
11
+ assert Dir . exist? ( n )
12
+ assert_operator 260 , :< , n . size
13
+ end
14
+
15
+ def test_file_rw
16
+ n = File . join ( LONG_PATH , "d" *150 )
17
+ File . write n , "abc"
18
+ assert_equal "abc" , File . read ( n )
19
+ assert File . exist? ( n )
20
+ assert_operator 260 , :< , n . size
21
+ end
22
+
23
+ def test_load
24
+ n = File . join ( LONG_PATH , "e" *150 + ".rb" )
25
+ File . write n , "def loaded_a; 41; end"
26
+ assert load ( n )
27
+ assert_equal 41 , loaded_a
28
+ assert_operator 260 , :< , n . size
29
+ end
30
+ end
You can’t perform that action at this time.
0 commit comments