@@ -1686,7 +1686,7 @@ impl AsInnerMut<fs_imp::DirBuilder> for DirBuilder {
1686
1686
}
1687
1687
}
1688
1688
1689
- #[ cfg( test) ]
1689
+ #[ cfg( all ( test, not ( target_os = "emscripten" ) ) ) ]
1690
1690
mod tests {
1691
1691
use io:: prelude:: * ;
1692
1692
@@ -1745,7 +1745,6 @@ mod tests {
1745
1745
}
1746
1746
1747
1747
#[ test]
1748
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1749
1748
fn file_test_io_smoke_test ( ) {
1750
1749
let message = "it's alright. have a good time" ;
1751
1750
let tmpdir = tmpdir ( ) ;
@@ -1767,7 +1766,6 @@ mod tests {
1767
1766
}
1768
1767
1769
1768
#[ test]
1770
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1771
1769
fn invalid_path_raises ( ) {
1772
1770
let tmpdir = tmpdir ( ) ;
1773
1771
let filename = & tmpdir. join ( "file_that_does_not_exist.txt" ) ;
@@ -1782,7 +1780,6 @@ mod tests {
1782
1780
}
1783
1781
1784
1782
#[ test]
1785
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1786
1783
fn file_test_iounlinking_invalid_path_should_raise_condition ( ) {
1787
1784
let tmpdir = tmpdir ( ) ;
1788
1785
let filename = & tmpdir. join ( "file_another_file_that_does_not_exist.txt" ) ;
@@ -1798,7 +1795,6 @@ mod tests {
1798
1795
}
1799
1796
1800
1797
#[ test]
1801
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1802
1798
fn file_test_io_non_positional_read ( ) {
1803
1799
let message: & str = "ten-four" ;
1804
1800
let mut read_mem = [ 0 ; 8 ] ;
@@ -1825,7 +1821,6 @@ mod tests {
1825
1821
}
1826
1822
1827
1823
#[ test]
1828
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1829
1824
fn file_test_io_seek_and_tell_smoke_test ( ) {
1830
1825
let message = "ten-four" ;
1831
1826
let mut read_mem = [ 0 ; 4 ] ;
@@ -1853,7 +1848,6 @@ mod tests {
1853
1848
}
1854
1849
1855
1850
#[ test]
1856
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1857
1851
fn file_test_io_seek_and_write ( ) {
1858
1852
let initial_msg = "food-is-yummy" ;
1859
1853
let overwrite_msg = "-the-bar!!" ;
@@ -1878,7 +1872,6 @@ mod tests {
1878
1872
}
1879
1873
1880
1874
#[ test]
1881
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1882
1875
fn file_test_io_seek_shakedown ( ) {
1883
1876
// 01234567890123
1884
1877
let initial_msg = "qwer-asdf-zxcv" ;
@@ -1911,7 +1904,6 @@ mod tests {
1911
1904
}
1912
1905
1913
1906
#[ test]
1914
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1915
1907
fn file_test_stat_is_correct_on_is_file ( ) {
1916
1908
let tmpdir = tmpdir ( ) ;
1917
1909
let filename = & tmpdir. join ( "file_stat_correct_on_is_file.txt" ) ;
@@ -1933,7 +1925,6 @@ mod tests {
1933
1925
}
1934
1926
1935
1927
#[ test]
1936
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1937
1928
fn file_test_stat_is_correct_on_is_dir ( ) {
1938
1929
let tmpdir = tmpdir ( ) ;
1939
1930
let filename = & tmpdir. join ( "file_stat_correct_on_is_dir" ) ;
@@ -1946,7 +1937,6 @@ mod tests {
1946
1937
}
1947
1938
1948
1939
#[ test]
1949
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1950
1940
fn file_test_fileinfo_false_when_checking_is_file_on_a_directory ( ) {
1951
1941
let tmpdir = tmpdir ( ) ;
1952
1942
let dir = & tmpdir. join ( "fileinfo_false_on_dir" ) ;
@@ -1956,7 +1946,6 @@ mod tests {
1956
1946
}
1957
1947
1958
1948
#[ test]
1959
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1960
1949
fn file_test_fileinfo_check_exists_before_and_after_file_creation ( ) {
1961
1950
let tmpdir = tmpdir ( ) ;
1962
1951
let file = & tmpdir. join ( "fileinfo_check_exists_b_and_a.txt" ) ;
@@ -1967,7 +1956,6 @@ mod tests {
1967
1956
}
1968
1957
1969
1958
#[ test]
1970
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1971
1959
fn file_test_directoryinfo_check_exists_before_and_after_mkdir ( ) {
1972
1960
let tmpdir = tmpdir ( ) ;
1973
1961
let dir = & tmpdir. join ( "before_and_after_dir" ) ;
@@ -1980,7 +1968,6 @@ mod tests {
1980
1968
}
1981
1969
1982
1970
#[ test]
1983
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
1984
1971
fn file_test_directoryinfo_readdir ( ) {
1985
1972
let tmpdir = tmpdir ( ) ;
1986
1973
let dir = & tmpdir. join ( "di_readdir" ) ;
@@ -2010,7 +1997,6 @@ mod tests {
2010
1997
}
2011
1998
2012
1999
#[ test]
2013
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2014
2000
fn file_create_new_already_exists_error ( ) {
2015
2001
let tmpdir = tmpdir ( ) ;
2016
2002
let file = & tmpdir. join ( "file_create_new_error_exists" ) ;
@@ -2020,7 +2006,6 @@ mod tests {
2020
2006
}
2021
2007
2022
2008
#[ test]
2023
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2024
2009
fn mkdir_path_already_exists_error ( ) {
2025
2010
let tmpdir = tmpdir ( ) ;
2026
2011
let dir = & tmpdir. join ( "mkdir_error_twice" ) ;
@@ -2030,7 +2015,6 @@ mod tests {
2030
2015
}
2031
2016
2032
2017
#[ test]
2033
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2034
2018
fn recursive_mkdir ( ) {
2035
2019
let tmpdir = tmpdir ( ) ;
2036
2020
let dir = tmpdir. join ( "d1/d2" ) ;
@@ -2039,7 +2023,6 @@ mod tests {
2039
2023
}
2040
2024
2041
2025
#[ test]
2042
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2043
2026
fn recursive_mkdir_failure ( ) {
2044
2027
let tmpdir = tmpdir ( ) ;
2045
2028
let dir = tmpdir. join ( "d1" ) ;
@@ -2054,13 +2037,11 @@ mod tests {
2054
2037
}
2055
2038
2056
2039
#[ test]
2057
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2058
2040
fn recursive_mkdir_slash ( ) {
2059
2041
check ! ( fs:: create_dir_all( & Path :: new( "/" ) ) ) ;
2060
2042
}
2061
2043
2062
2044
#[ test]
2063
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2064
2045
fn recursive_rmdir ( ) {
2065
2046
let tmpdir = tmpdir ( ) ;
2066
2047
let d1 = tmpdir. join ( "d1" ) ;
@@ -2080,7 +2061,6 @@ mod tests {
2080
2061
}
2081
2062
2082
2063
#[ test]
2083
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2084
2064
fn recursive_rmdir_of_symlink ( ) {
2085
2065
// test we do not recursively delete a symlink but only dirs.
2086
2066
let tmpdir = tmpdir ( ) ;
@@ -2114,7 +2094,6 @@ mod tests {
2114
2094
}
2115
2095
2116
2096
#[ test]
2117
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2118
2097
fn unicode_path_is_dir ( ) {
2119
2098
assert ! ( Path :: new( "." ) . is_dir( ) ) ;
2120
2099
assert ! ( !Path :: new( "test/stdtest/fs.rs" ) . is_dir( ) ) ;
@@ -2134,7 +2113,6 @@ mod tests {
2134
2113
}
2135
2114
2136
2115
#[ test]
2137
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2138
2116
fn unicode_path_exists ( ) {
2139
2117
assert ! ( Path :: new( "." ) . exists( ) ) ;
2140
2118
assert ! ( !Path :: new( "test/nonexistent-bogus-path" ) . exists( ) ) ;
@@ -2148,7 +2126,6 @@ mod tests {
2148
2126
}
2149
2127
2150
2128
#[ test]
2151
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2152
2129
fn copy_file_does_not_exist ( ) {
2153
2130
let from = Path :: new ( "test/nonexistent-bogus-path" ) ;
2154
2131
let to = Path :: new ( "test/other-bogus-path" ) ;
@@ -2163,7 +2140,6 @@ mod tests {
2163
2140
}
2164
2141
2165
2142
#[ test]
2166
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2167
2143
fn copy_src_does_not_exist ( ) {
2168
2144
let tmpdir = tmpdir ( ) ;
2169
2145
let from = Path :: new ( "test/nonexistent-bogus-path" ) ;
@@ -2177,7 +2153,6 @@ mod tests {
2177
2153
}
2178
2154
2179
2155
#[ test]
2180
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2181
2156
fn copy_file_ok ( ) {
2182
2157
let tmpdir = tmpdir ( ) ;
2183
2158
let input = tmpdir. join ( "in.txt" ) ;
@@ -2194,7 +2169,6 @@ mod tests {
2194
2169
}
2195
2170
2196
2171
#[ test]
2197
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2198
2172
fn copy_file_dst_dir ( ) {
2199
2173
let tmpdir = tmpdir ( ) ;
2200
2174
let out = tmpdir. join ( "out" ) ;
@@ -2206,7 +2180,6 @@ mod tests {
2206
2180
}
2207
2181
2208
2182
#[ test]
2209
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2210
2183
fn copy_file_dst_exists ( ) {
2211
2184
let tmpdir = tmpdir ( ) ;
2212
2185
let input = tmpdir. join ( "in" ) ;
@@ -2222,7 +2195,6 @@ mod tests {
2222
2195
}
2223
2196
2224
2197
#[ test]
2225
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2226
2198
fn copy_file_src_dir ( ) {
2227
2199
let tmpdir = tmpdir ( ) ;
2228
2200
let out = tmpdir. join ( "out" ) ;
@@ -2234,7 +2206,6 @@ mod tests {
2234
2206
}
2235
2207
2236
2208
#[ test]
2237
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2238
2209
fn copy_file_preserves_perm_bits ( ) {
2239
2210
let tmpdir = tmpdir ( ) ;
2240
2211
let input = tmpdir. join ( "in.txt" ) ;
@@ -2263,7 +2234,6 @@ mod tests {
2263
2234
}
2264
2235
2265
2236
#[ test]
2266
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2267
2237
fn symlinks_work ( ) {
2268
2238
let tmpdir = tmpdir ( ) ;
2269
2239
if !got_symlink_permission ( & tmpdir) { return } ;
@@ -2282,7 +2252,6 @@ mod tests {
2282
2252
}
2283
2253
2284
2254
#[ test]
2285
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2286
2255
fn symlink_noexist ( ) {
2287
2256
// Symlinks can point to things that don't exist
2288
2257
let tmpdir = tmpdir ( ) ;
@@ -2296,7 +2265,6 @@ mod tests {
2296
2265
}
2297
2266
2298
2267
#[ test]
2299
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2300
2268
fn read_link ( ) {
2301
2269
if cfg ! ( windows) {
2302
2270
// directory symlink
@@ -2317,7 +2285,6 @@ mod tests {
2317
2285
}
2318
2286
2319
2287
#[ test]
2320
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2321
2288
fn readlink_not_symlink ( ) {
2322
2289
let tmpdir = tmpdir ( ) ;
2323
2290
match fs:: read_link ( tmpdir. path ( ) ) {
@@ -2327,7 +2294,6 @@ mod tests {
2327
2294
}
2328
2295
2329
2296
#[ test]
2330
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2331
2297
fn links_work ( ) {
2332
2298
let tmpdir = tmpdir ( ) ;
2333
2299
let input = tmpdir. join ( "in.txt" ) ;
@@ -2356,7 +2322,6 @@ mod tests {
2356
2322
}
2357
2323
2358
2324
#[ test]
2359
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2360
2325
fn chmod_works ( ) {
2361
2326
let tmpdir = tmpdir ( ) ;
2362
2327
let file = tmpdir. join ( "in.txt" ) ;
@@ -2380,7 +2345,6 @@ mod tests {
2380
2345
}
2381
2346
2382
2347
#[ test]
2383
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2384
2348
fn sync_doesnt_kill_anything ( ) {
2385
2349
let tmpdir = tmpdir ( ) ;
2386
2350
let path = tmpdir. join ( "in.txt" ) ;
@@ -2394,7 +2358,6 @@ mod tests {
2394
2358
}
2395
2359
2396
2360
#[ test]
2397
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2398
2361
fn truncate_works ( ) {
2399
2362
let tmpdir = tmpdir ( ) ;
2400
2363
let path = tmpdir. join ( "in.txt" ) ;
@@ -2429,7 +2392,6 @@ mod tests {
2429
2392
}
2430
2393
2431
2394
#[ test]
2432
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2433
2395
fn open_flavors ( ) {
2434
2396
use fs:: OpenOptions as OO ;
2435
2397
fn c < T : Clone > ( t : & T ) -> T { t. clone ( ) }
@@ -2549,7 +2511,6 @@ mod tests {
2549
2511
}
2550
2512
2551
2513
#[ test]
2552
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2553
2514
fn binary_file ( ) {
2554
2515
let mut bytes = [ 0 ; 1024 ] ;
2555
2516
StdRng :: new ( ) . unwrap ( ) . fill_bytes ( & mut bytes) ;
@@ -2563,7 +2524,6 @@ mod tests {
2563
2524
}
2564
2525
2565
2526
#[ test]
2566
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2567
2527
fn file_try_clone ( ) {
2568
2528
let tmpdir = tmpdir ( ) ;
2569
2529
@@ -2586,7 +2546,6 @@ mod tests {
2586
2546
}
2587
2547
2588
2548
#[ test]
2589
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2590
2549
#[ cfg( not( windows) ) ]
2591
2550
fn unlink_readonly ( ) {
2592
2551
let tmpdir = tmpdir ( ) ;
@@ -2599,15 +2558,13 @@ mod tests {
2599
2558
}
2600
2559
2601
2560
#[ test]
2602
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2603
2561
fn mkdir_trailing_slash ( ) {
2604
2562
let tmpdir = tmpdir ( ) ;
2605
2563
let path = tmpdir. join ( "file" ) ;
2606
2564
check ! ( fs:: create_dir_all( & path. join( "a/" ) ) ) ;
2607
2565
}
2608
2566
2609
2567
#[ test]
2610
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2611
2568
fn canonicalize_works_simple ( ) {
2612
2569
let tmpdir = tmpdir ( ) ;
2613
2570
let tmpdir = fs:: canonicalize ( tmpdir. path ( ) ) . unwrap ( ) ;
@@ -2617,7 +2574,6 @@ mod tests {
2617
2574
}
2618
2575
2619
2576
#[ test]
2620
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2621
2577
fn realpath_works ( ) {
2622
2578
let tmpdir = tmpdir ( ) ;
2623
2579
if !got_symlink_permission ( & tmpdir) { return } ;
@@ -2643,7 +2599,6 @@ mod tests {
2643
2599
}
2644
2600
2645
2601
#[ test]
2646
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2647
2602
fn realpath_works_tricky ( ) {
2648
2603
let tmpdir = tmpdir ( ) ;
2649
2604
if !got_symlink_permission ( & tmpdir) { return } ;
@@ -2673,7 +2628,6 @@ mod tests {
2673
2628
}
2674
2629
2675
2630
#[ test]
2676
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2677
2631
fn dir_entry_methods ( ) {
2678
2632
let tmpdir = tmpdir ( ) ;
2679
2633
@@ -2708,14 +2662,12 @@ mod tests {
2708
2662
}
2709
2663
2710
2664
#[ test]
2711
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2712
2665
fn read_dir_not_found ( ) {
2713
2666
let res = fs:: read_dir ( "/path/that/does/not/exist" ) ;
2714
2667
assert_eq ! ( res. err( ) . unwrap( ) . kind( ) , ErrorKind :: NotFound ) ;
2715
2668
}
2716
2669
2717
2670
#[ test]
2718
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2719
2671
fn create_dir_all_with_junctions ( ) {
2720
2672
let tmpdir = tmpdir ( ) ;
2721
2673
let target = tmpdir. join ( "target" ) ;
@@ -2743,7 +2695,6 @@ mod tests {
2743
2695
}
2744
2696
2745
2697
#[ test]
2746
- #[ cfg_attr( target_os = "emscripten" , ignore) ]
2747
2698
fn metadata_access_times ( ) {
2748
2699
let tmpdir = tmpdir ( ) ;
2749
2700
0 commit comments