@@ -39,32 +39,36 @@ mv ./packages/main/src/Main2.res ./packages/main/src/Main.res
3939# Rename a file with a dependent - this should trigger an error
4040mv ./packages/main/src/InternalDep.res ./packages/main/src/InternalDep2.res
4141rewatch build & > ../tests/snapshots/rename-file-internal-dep.txt
42- # replace the absolute path so the snapshot is the same on all machines
43- replace " s/ $( pwd | sed " s/\// \\\\ \//g " ) //g " ../tests/snapshots/rename-file-internal-dep.txt
42+ # normalize paths so the snapshot is the same on all machines
43+ normalize_paths ../tests/snapshots/rename-file-internal-dep.txt
4444mv ./packages/main/src/InternalDep2.res ./packages/main/src/InternalDep.res
4545
4646# Rename a file with a dependent in a namespaced package - this should trigger an error (regression)
4747mv ./packages/new-namespace/src/Other_module.res ./packages/new-namespace/src/Other_module2.res
4848rewatch build & > ../tests/snapshots/rename-file-internal-dep-namespace.txt
49- # replace the absolute path so the snapshot is the same on all machines
50- replace " s/ $( pwd | sed " s/\// \\\\ \//g " ) //g " ../tests/snapshots/rename-file-internal-dep-namespace.txt
49+ # normalize paths so the snapshot is the same on all machines
50+ normalize_paths ../tests/snapshots/rename-file-internal-dep-namespace.txt
5151mv ./packages/new-namespace/src/Other_module2.res ./packages/new-namespace/src/Other_module.res
5252
5353rewatch build & > /dev/null
5454mv ./packages/main/src/ModuleWithInterface.resi ./packages/main/src/ModuleWithInterface2.resi
5555rewatch build & > ../tests/snapshots/rename-interface-file.txt
56+ # normalize paths so the snapshot is the same on all machines
57+ normalize_paths ../tests/snapshots/rename-interface-file.txt
5658mv ./packages/main/src/ModuleWithInterface2.resi ./packages/main/src/ModuleWithInterface.resi
5759rewatch build & > /dev/null
5860mv ./packages/main/src/ModuleWithInterface.res ./packages/main/src/ModuleWithInterface2.res
5961rewatch build & > ../tests/snapshots/rename-file-with-interface.txt
62+ # normalize paths so the snapshot is the same on all machines
63+ normalize_paths ../tests/snapshots/rename-file-with-interface.txt
6064mv ./packages/main/src/ModuleWithInterface2.res ./packages/main/src/ModuleWithInterface.res
6165rewatch build & > /dev/null
6266
6367# when deleting a file that other files depend on, the compile should fail
6468rm packages/dep02/src/Dep02.res
6569rewatch build & > ../tests/snapshots/remove-file.txt
66- # replace the absolute path so the snapshot is the same on all machines
67- replace " s/ $( pwd | sed " s/\// \\\\ \//g " ) //g " ../tests/snapshots/remove-file.txt
70+ # normalize paths so the snapshot is the same on all machines
71+ normalize_paths ../tests/snapshots/remove-file.txt
6872git checkout -- packages/dep02/src/Dep02.res
6973rewatch build & > /dev/null
7074
0 commit comments