I've tried to use phoenx to generate a framework target and its unitest target from one folder.
Currently I use the following lines:
framework.sources = ["SourcesFramework/**/*[!c].{h,m,c,swift}"]test.sources = ["SourcesFramework/**/*Spec.{h,m,c,swift}"]
Example:
The files *.Spec are unittest code, the other files are framework code.
Now I see a unit test file directly below the matching code file. I do not have to manage a second file structure, I can take a look into the specification without searching the unit test first and i see that StoredBoolSpec.swift is missing!.
This is amazing and only possible with phoenx!
BUT: It was only possible for me by excluding all files ending with 'c' 😒 I didn't find a better way to exclude all files ending to 'Spec'.
This doesn't work:
framework.sources = ["SourcesFramework/**/*[!Spec].{h,m,c,swift}"]framework.sources = ["SourcesFramework/**/*[!S][!p][!e][!c].{h,m,c,swift}"]
I think, the possibilities to exclude files are currently very limited. Maybe you have a better idea.
I searched for the problem and found stackoverflow. So I think we need an additional excludedsources.
Example:
framework.sources = ["SourcesFramework/**/*.{h,m,c,swift}"]framework.excludedsources = ["SourcesFramework/**/*Spec.{h,m,c,swift}"]test.sources = ["SourcesFramework/**/*Spec.{h,m,c,swift}"]
I've tried to use phoenx to generate a framework target and its unitest target from one folder. Currently I use the following lines:
framework.sources = ["SourcesFramework/**/*[!c].{h,m,c,swift}"]
test.sources = ["SourcesFramework/**/*Spec.{h,m,c,swift}"]
Example: The files *.Spec are unittest code, the other files are framework code. Now I see a unit test file directly below the matching code file. I do not have to manage a second file structure, I can take a look into the specification without searching the unit test first and i see that StoredBoolSpec.swift is missing!. This is amazing and only possible with phoenx!
BUT: It was only possible for me by excluding all files ending with 'c' 😒 I didn't find a better way to exclude all files ending to 'Spec'. This doesn't work:
framework.sources = ["SourcesFramework/**/*[!Spec].{h,m,c,swift}"]
framework.sources = ["SourcesFramework/**/*[!S][!p][!e][!c].{h,m,c,swift}"]
I think, the possibilities to exclude files are currently very limited. Maybe you have a better idea.I searched for the problem and found stackoverflow. So I think we need an additional excludedsources. Example:
framework.sources = ["SourcesFramework/**/*.{h,m,c,swift}"]
framework.excludedsources = ["SourcesFramework/**/*Spec.{h,m,c,swift}"]
test.sources = ["SourcesFramework/**/*Spec.{h,m,c,swift}"]
What do you think about this feature?