This is an automated email from the ASF dual-hosted git repository.

dpogue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new 747be554 test: Improve test coverage of Bridging Headers & fix edge 
case (#1536)
747be554 is described below

commit 747be554131a5aeca2d95fc2729e6092d6a2264f
Author: Darryl Pogue <dar...@dpogue.ca>
AuthorDate: Sat May 17 17:15:57 2025 -0700

    test: Improve test coverage of Bridging Headers & fix edge case (#1536)
---
 lib/BridgingHeader.js                           | 2 +-
 tests/spec/unit/fixtures/test-Bridging-Header.h | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/BridgingHeader.js b/lib/BridgingHeader.js
index a15d73f3..fdc34e11 100644
--- a/lib/BridgingHeader.js
+++ b/lib/BridgingHeader.js
@@ -111,7 +111,7 @@ BridgingHeader.prototype.__parseForBridgingHeader = 
function (text) {
         }
     }
     if (start < i) {
-        list.push({ type, code: text.slice(start, i) });
+        list.push({ type, code: text.slice(start, i) + '\n' });
     }
     return list;
 };
diff --git a/tests/spec/unit/fixtures/test-Bridging-Header.h 
b/tests/spec/unit/fixtures/test-Bridging-Header.h
index 23f42e77..8afaa6a3 100644
--- a/tests/spec/unit/fixtures/test-Bridging-Header.h
+++ b/tests/spec/unit/fixtures/test-Bridging-Header.h
@@ -17,6 +17,7 @@
  under the License.
  */
 
-#import <Cordova/Cordova.h>
-#import "CDVSwift22Object.h"
-#import "CDVSwift2Object.h"
+// This is a bridging header to expose stuff to Swift
+#import <Cordova/Cordova.h> // CordovaLib
+#import /* Other headers */ "CDVSwift22Object.h"
+#import "CDVSwift2Object.h"
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org
For additional commands, e-mail: commits-h...@cordova.apache.org

Reply via email to