@@ -81,15 +81,7 @@ void test_reading_existing_symlinks() {
8181 continue ;
8282 }
8383
84- // WASMFS behaves the same as Linux (and as best as I can tell, the spec),
85- // seeing the symlink as a string. The old JS FS instead normalizes it and
86- // returns something modified.
87- // The same happens in the assertions below.
88- #if !defined(__EMSCRIPTEN__ ) || defined(WASMFS )
8984 assert (strcmp (buffer , "../test/../there!" ) == 0 );
90- #else
91- assert (strcmp (buffer , "/there!" ) == 0 );
92- #endif
9385 assert (strlen (buffer ) == rtn );
9486 errno = 0 ;
9587 }
@@ -111,11 +103,7 @@ void test_creating_symlink() {
111103 char buffer [256 ] = {0 };
112104 rtn = readlink ("directory/link" , buffer , 256 );
113105 assert (errno == 0 );
114- #if !defined(__EMSCRIPTEN__ ) || defined(WASMFS )
115106 assert (strcmp (buffer , "new-nonexistent-path" ) == 0 );
116- #else
117- assert (strcmp (buffer , "/working/directory/new-nonexistent-path" ) == 0 );
118- #endif
119107 assert (strlen (buffer ) == rtn );
120108 errno = 0 ;
121109}
@@ -127,11 +115,7 @@ void test_reading_shortened_symlink() {
127115 int rtn = readlink ("link" , buffer , 4 );
128116 assert (errno == 0 );
129117 assert (rtn == 4 );
130- #if !defined(__EMSCRIPTEN__ ) || defined(WASMFS )
131118 assert (strcmp (buffer , "../t**nexistent-path" ) == 0 );
132- #else
133- assert (strcmp (buffer , "/the**ng/directory/new-nonexistent-path" ) == 0 );
134- #endif
135119 errno = 0 ;
136120}
137121
0 commit comments