You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by be...@apache.org on 2013/07/16 02:26:55 UTC
git commit: added tests for adding/removing Conent refereces to
csproj file
Updated Branches:
refs/heads/master 2c284820b -> 9c0d63742
added tests for adding/removing Conent refereces to csproj file
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugman/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugman/commit/9c0d6374
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugman/tree/9c0d6374
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugman/diff/9c0d6374
Branch: refs/heads/master
Commit: 9c0d63742f665dd51390345acbaa1d08c35b60fe
Parents: 2c28482
Author: Benn Mapes <be...@gmail.com>
Authored: Mon Jul 15 17:24:53 2013 -0700
Committer: Benn Mapes <be...@gmail.com>
Committed: Mon Jul 15 17:24:53 2013 -0700
----------------------------------------------------------------------
spec/util/csproj.spec.js | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugman/blob/9c0d6374/spec/util/csproj.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/csproj.spec.js b/spec/util/csproj.spec.js
index a75b68b..7228f15 100644
--- a/spec/util/csproj.spec.js
+++ b/spec/util/csproj.spec.js
@@ -34,6 +34,7 @@ describe('csproj', function() {
var page_test_cs = path.join('src', 'UI', 'PageTest.xaml.cs');
var lib_test = path.join('lib', 'LibraryTest.dll');
var file_test = path.join('src', 'FileTest.cs');
+ var content_test = path.join('src', 'Content.img');
describe('add method', function() {
@@ -57,6 +58,10 @@ describe('csproj', function() {
test_csproj.addSourceFile(file_test);
expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeTruthy();
});
+ it('should properly add content files', function() {
+ test_csproj.addSourceFile(content_test);
+ expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeTruthy();
+ });
});
@@ -78,6 +83,10 @@ describe('csproj', function() {
test_csproj.removeSourceFile(file_test);
expect(test_csproj.xml.getroot().find('.//Compile[@Include="src\\FileTest.cs"]')).toBeFalsy();
});
+ it('should properly remove content files', function() {
+ test_csproj.removeSourceFile(content_test);
+ expect(test_csproj.xml.getroot().find('.//Content[@Include="src\\Content.img"]')).toBeFalsy();
+ });
it('should remove all empty ItemGroup\'s', function() {
test_csproj.removeSourceFile(page_test);
test_csproj.removeSourceFile(page_test_cs);