From 0343d81c9f2ec8e5518e49ce5d68064cfc37466b Mon Sep 17 00:00:00 2001 From: Jason Filsinger Date: Wed, 16 Oct 2013 22:04:23 -0700 Subject: [PATCH] removing path.translate from cs.listsources to prevent the use of double backslash path delimiters. --- src/actions/make/make_csharp.lua | 2 +- tests/actions/make/cs/test_embed_files.lua | 4 ++-- tests/actions/make/cs/test_sources.lua | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/actions/make/make_csharp.lua b/src/actions/make/make_csharp.lua index bc4584dc..88eafa87 100644 --- a/src/actions/make/make_csharp.lua +++ b/src/actions/make/make_csharp.lua @@ -108,7 +108,7 @@ onleaf = function(node, depth) local value = selector(node) if value then - _x('\t%s \\', path.translate(value)) + _x('\t%s \\', value) end end }) diff --git a/tests/actions/make/cs/test_embed_files.lua b/tests/actions/make/cs/test_embed_files.lua index 32679d3b..cc6ba210 100644 --- a/tests/actions/make/cs/test_embed_files.lua +++ b/tests/actions/make/cs/test_embed_files.lua @@ -35,7 +35,7 @@ prepare() test.capture [[ EMBEDFILES += \ - $(OBJDIR)\MyProject.Hello.resources \ + $(OBJDIR)/MyProject.Hello.resources \ ]] end @@ -50,7 +50,7 @@ EMBEDFILES += \ prepare() test.capture [[ EMBEDFILES += \ - $(OBJDIR)\MyProject.Hello.resources \ + $(OBJDIR)/MyProject.Hello.resources \ ]] end diff --git a/tests/actions/make/cs/test_sources.lua b/tests/actions/make/cs/test_sources.lua index b2105677..fa49a721 100644 --- a/tests/actions/make/cs/test_sources.lua +++ b/tests/actions/make/cs/test_sources.lua @@ -40,6 +40,21 @@ SOURCES += \ ]] end +-- +-- Path delimiter uses slash instead of backslash +-- + + function suite.doesUseProperPathDelimiter() + files { "Folder\\Hello.cs", "Folder/World.cs" } + prepare() + test.capture [[ +SOURCES += \ + Folder/Hello.cs \ + Folder/World.cs \ + + ]] + end + -- -- Files that should not be compiled should be excluded. @@ -72,4 +87,3 @@ SOURCES += \ ]] end -