Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure items in paket references are trimmed
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
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
25 changes: 25 additions & 0 deletions
25
src/test/groovy/wooga/gradle/paket/base/utils/internal/PaketUnityReferencesSpec.groovy
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package wooga.gradle.paket.base.utils.internal | ||
|
||
import spock.lang.Shared | ||
import spock.lang.Specification | ||
import spock.lang.Unroll | ||
import wooga.gradle.paket.base.utils.internal.PaketTemplate | ||
|
||
class PaketUnityReferencesSpec extends Specification { | ||
|
||
@Unroll | ||
def "ensure items are trimmed"() { | ||
|
||
when: | ||
def refs = new PaketUnityReferences(content) | ||
|
||
then: | ||
refs.nugets == nugets | ||
|
||
where: | ||
content | nugets | ||
"A1\nA2\nA3\n" | ["A1", "A2", "A3"] | ||
" A1 \nA2\nA3\n" | ["A1", "A2", "A3"] | ||
" A1 \n A2 \nA3 \n" | ["A1", "A2", "A3"] | ||
} | ||
} |