-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
107 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
-- Test module for mode-specific path operations | ||
|
||
-- Test prepend_path with mode | ||
prepend_path{"PATH", "/test/bin/load", mode={"load"}} | ||
prepend_path{"PATH", "/test/bin/unload", mode={"unload"}} | ||
prepend_path{"PATH", "/test/bin/both", mode={"load", "unload"}} | ||
prepend_path("PATH", "/test/bin/normal") -- Normal prepend for comparison | ||
prepend_path{"PATH", "/test/bin/load", mode={"load"}} -- Should only apply during load | ||
prepend_path{"PATH", "/test/bin/unload", mode={"unload"}} -- Should only apply during unload | ||
prepend_path{"PATH", "/test/bin/both", mode={"load", "unload"}} -- Should apply during both | ||
prepend_path("PATH", "/test/bin/normal") -- Should always apply | ||
|
||
-- Test append_path with mode | ||
append_path{"LD_LIBRARY_PATH", "/test/lib/load", mode={"load"}} | ||
append_path{"LD_LIBRARY_PATH", "/test/lib/unload", mode={"unload"}} | ||
append_path{"LD_LIBRARY_PATH", "/test/lib/both", mode={"load", "unload"}} | ||
append_path("LD_LIBRARY_PATH", "/test/lib/normal") -- Normal append for comparison | ||
append_path{"LD_LIBRARY_PATH", "/test/lib/load", mode={"load"}} -- Should only apply during load | ||
append_path{"LD_LIBRARY_PATH", "/test/lib/unload", mode={"unload"}} -- Should only apply during unload | ||
append_path{"LD_LIBRARY_PATH", "/test/lib/both", mode={"load", "unload"}} -- Should apply during both | ||
append_path("LD_LIBRARY_PATH", "/test/lib/normal") -- Should always apply | ||
|
||
-- Test remove_path with mode | ||
remove_path{"REMOVE_PATH", "/old/bin/load", mode={"load"}} | ||
remove_path{"REMOVE_PATH", "/old/bin/unload", mode={"unload"}} | ||
remove_path{"REMOVE_PATH", "/old/bin/both", mode={"load", "unload"}} | ||
remove_path("REMOVE_PATH", "/old/bin/normal") -- Normal remove for comparison | ||
remove_path{"REMOVE_PATH", "/old/bin/load", mode={"load"}} -- Should only remove during load | ||
remove_path{"REMOVE_PATH", "/old/bin/unload", mode={"unload"}} -- Should only remove during unload | ||
remove_path{"REMOVE_PATH", "/old/bin/both", mode={"load", "unload"}} -- Should remove during both | ||
remove_path("REMOVE_PATH", "/old/bin/normal") -- Should always remove | ||
|
||
-- Test with delimiters and priorities | ||
prepend_path{"CUSTOM_PATH", "/custom/path", delim=";", priority=100, mode={"load"}} | ||
append_path{"CUSTOM_LIB", "/custom/lib", delim=":", priority=50, mode={"unload"}} | ||
prepend_path{"CUSTOM_PATH", "/custom/path", delim=";", priority=100, mode={"load"}} -- Should only apply during load | ||
append_path{"CUSTOM_LIB", "/custom/lib", delim=":", priority=50, mode={"unload"}} -- Should only apply during unload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters