tempura-sukiyaki
40e3fbf5ea
Change deferred join delimiter to non-printable character
...
This is a squashed and rebased version of #1384 , authored by @tempura-sukiyaki. Changes the deferred join path delimiter to a non-printable character to avoid conflicts with the pipe symbol in paths.
2020-02-25 18:53:26 -05:00
Sam Surtees
9128498bf9
Fixed edge case in path.normalize
2020-02-02 16:30:44 +10:00
tdesveaux
a1d7e8657c
Host path.normalize: Fix normalization for paths containing tokens
2018-11-04 18:01:29 +01:00
Thomas Desveaux
f68c386341
path.normalize: Fix when call with path surrounded with quotes
2018-10-11 14:21:42 +02:00
tdesveaux
439a1b373d
Path normalize: Add test for server path (//)
2018-08-12 15:17:20 +02:00
Thomas Desveaux
051ed6a1ab
Path normalize: Add test with trailing dot
2018-07-19 18:34:36 +02:00
Sebastian Kylander
b618a94d7c
Add tests for server paths
2018-07-17 23:41:22 +02:00
Sam Surtees
138a443b3c
Fixed issues with duplicate tests
...
- Test suite will now fail when test names are reused
- Fixed several unit tests that reused test names
2018-04-30 17:01:20 +02:00
Sam Surtees
9039232548
Fixed a bug with normalizing paths that contain dot folders
...
- Added additional tests
2018-01-08 03:21:55 +10:00
R. Blaine Whittle
b88d4eff3e
[core] path:join can now be deferred for those paths that execute lua
...
prior to this change, paths that begin with ${ } were sometimes assumed to
be either absolute or relative. new functions have been added in order
to reduce the number of systems that can break.
new functions are
path:absolutetype -> similair to isabsolute but can return an unknown or maybe result
path:deferredjoin -> similair to path:join but creates a string for unknown absolute
paths which we except to be generated at bake time
path:hasdeferredjoin -> predicate to determine if a path needs to be evaled for
a deferred join
path:resolvedeferredjoin -> resolves a deferredjoin path to an actual path
this is to be called after any %{} replacements occur.
right now all api path types use the deferredjoin code path and
detoken, solution:makerelative and project:makerelative have been updated
to use resolvedeferredjoin.
unit tests have been created to test the four new path functions.
added unit tests
2017-10-04 09:53:00 -07:00
Sam Surtees
b251234b27
Cleaned up inconsistencies in whitespace
2017-04-26 03:40:43 +10:00
Sam Surtees
c6af364311
Fixed bug where path.normalize was being overzealous with removing instances of ".." breaking paths. Fixes #579
2016-09-21 01:40:27 +10:00
Eyal Solnik
9d068901f9
Fix replaceextension from adding a leading dot
...
When an empty string was passed to replaceextension
as the new extension, it added a leading dot,
this update fixes/prevents it.
2016-03-29 20:15:19 +03:00
Eyal Solnik
82fd64e00c
Fix getextension to handle paths w/ dot correctly
2016-03-29 10:02:49 +03:00
Jason Perkins
dbb42a0b77
Merge pull request #307 from LORgames/ssurtees/translatePathFix
...
Modify `path.translate()` to use target OS path separator by default
2016-03-17 12:13:55 -04:00
Jason Perkins
5c3f2b8835
Some environments and toolsets allow additional characters within $(...) tokens. Adding the dot "."
2016-03-07 16:38:50 -05:00
Sam Surtees
d382228ceb
Converted premake-core tests over to use premake.action.set() instead of _ACTION
2016-02-06 13:35:54 +10:00
Sam Surtees
f60a1b391f
path.translate now uses the target OS separator by default instead of Windows separator.
2016-02-06 13:35:03 +10:00
Tom van Dijck
d387209ed4
fix "do_isabsolute", and add more tests.
2016-02-05 13:15:01 -08:00
Jason Perkins
ef5ac384cf
Add support for DOS-style environment variables, e.g. %JAVA_HOME%
2016-01-20 14:06:38 -05:00
James Touton
d26944a64e
Added tests for complex joins with .. components.
2015-09-05 17:40:50 -07:00
StiX
16dded0499
Fixed path.normalize
2015-08-12 00:21:23 +02:00
Lusito
15ceabac48
fix for path.join problem when both string start with a "..", a unit test has been added
2015-08-01 21:10:02 +02:00
Tom van Dijck
fc9c8d224d
oops.. remove out paths.
2015-06-08 11:12:17 -07:00
Tom van Dijck
c3c2045d92
filter out /./ in path.join and path.normalize
2015-06-08 11:08:08 -07:00
Jason Perkins
aafdc11626
Prevent environment variables from being trimmed out by ".." sequences in path.join()
2015-05-20 18:15:41 -04:00
Tom van Dijck
6f20d21328
performance improvement by handling edge .. directories during path join
2015-05-18 18:08:36 -07:00
Jason Perkins
614cea1c98
Fix handling of "../../.." sequences in path.normalize()
2015-04-08 18:01:43 -04:00
tdijck
71a286da8c
strip ../ in path.normalize
2015-03-31 11:49:47 -07:00
Jason Perkins
346d3db25c
Allows to replace the extension - if exist - of a path (M Skibbe)
...
No magic but i really often need such a functionality. Espacialy for buildrules.
2015-03-29 17:25:22 -04:00
Jason Perkins
b3216cbcf8
Return absolute path if getrelative() hits the top of a DOS file system (issue #213 )
2013-12-20 15:08:05 -05:00
Jason Perkins
9831545e2d
Fix path.getrelative() when trailing slashes are present
2013-10-22 16:32:51 -04:00
Jason Perkins
1e24b4790b
Improve path.getabsolute
...
- Allow optional second "relative to" argument to use as base for conversion
- Fix handling of paths like: $ORIGIN/../lib
2013-10-12 16:18:54 -04:00
Jason Perkins
8d8a3e3574
Fix: path.getrelative() gives incorrect results for paths containing "//"
2013-03-06 10:06:45 -05:00
Jason Perkins
c94073fc7e
Port path.getabsolute() from Lua to C
2013-01-04 10:18:47 -05:00
Jason Perkins
b25c12f2b6
Ported old stress test; moved path.join() to C
2013-01-03 11:11:31 -05:00
Jason Perkins
a2aa2f83e1
path.isabsolute() now recognizes quoted shell variables
2012-03-19 18:57:45 -04:00
Jason Perkins
0d46fe4135
Merge with premake-dev
2012-01-25 16:10:59 -05:00
Jason Perkins
1e97713a26
Default path.translate() to Windows-style backslashes
2012-01-25 15:58:21 -05:00
Jason Perkins
283ecaeb45
Ported Visual Studio 2008 files element and supporting functions
2012-01-19 19:14:18 -05:00
Jason Perkins
e4d23a49bf
Patch 3111264: Allow path.join() to accept any number of args
2012-01-19 15:28:24 -05:00
Jason Perkins
1631cff164
Removed a bunch of deprecated VC2010 code
2011-07-12 16:55:27 -04:00
Jason Perkins
ccb5d34c95
Merged with premake-stable
2011-03-23 17:05:19 -04:00
Jason Perkins
7b0636f999
[ #3232160 ] Environment variables are cut off
2011-03-23 16:38:40 -04:00
Jason Perkins
c9d4e88278
Add test to ensure path.join() can be called with a nil argument
2011-01-18 12:25:43 -05:00
starkos
0a6c7bcd31
Patch 2965229: Fix handling of '+' symbol in file patterns (Rachel Blum)
2010-03-08 14:57:21 +00:00
starkos
8f3411d708
Bug 2953594: includedirs / libdirs converting absolute paths to relative
2010-02-27 02:50:55 +00:00
starkos
96b28c3146
Bug 2958829: Files pattern matching including too many files
2010-02-27 02:00:50 +00:00
starkos
6a323fc263
Bug 2903430: Using relative instead of absolute paths with $() macro
2009-12-08 20:25:35 +00:00
starkos
293b03daa2
Fixed bug in Xcode group pathing; started work on project dependencies
2009-11-25 19:40:23 +00:00