Skip to content

Commit

Permalink
Fix test failures in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
prakanth97 committed Dec 21, 2023
1 parent 68dc4de commit 85ff30a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Ensure all Java files use LF.
# Ensure all Java and XML files use LF.
*.java eol=lf
*.xml eol=lf
13 changes: 0 additions & 13 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ version = "0.1.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.regexp"},
{org = "ballerina", name = "test"}
]
modules = [
Expand Down Expand Up @@ -51,18 +50,6 @@ dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "lang.regexp"
version = "0.0.0"
scope = "testOnly"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]
modules = [
{org = "ballerina", packageName = "lang.regexp", moduleName = "lang.regexp"}
]

[[package]]
org = "ballerina"
name = "lang.value"
Expand Down
11 changes: 6 additions & 5 deletions ballerina/tests/stream_namespace_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import ballerina/io;
import ballerina/test;
import ballerina/lang.regexp;

@Namespace {
uri: "http://www.example.com/products",
Expand Down Expand Up @@ -200,8 +199,9 @@ function testNamespaceInvoiceFullPlain() returns error? {
test:assertEquals(invoice.products.product[0].length(), 5, "Product 1 field count mismatched");
test:assertEquals(invoice.products.product[0].id, 1);
test:assertEquals(invoice.products.product[0].name, "Product 1");
test:assertEquals(regexp:replaceAll(re `[\r\n]`, invoice.products.product[0].description, "\n"),
"This is the description for\n Product 1.\n ");
test:assertEquals(invoice.products.product[0].description, string `This is the description for
Product 1.
`);
test:assertEquals(invoice.products.product[0].price.length(), 2, "Price 1 price field count mismatched");
test:assertEquals(invoice.products.product[0].price.\#content, 57.70d);
test:assertEquals(invoice.products.product[0].price.currency, "USD");
Expand All @@ -210,8 +210,9 @@ function testNamespaceInvoiceFullPlain() returns error? {
test:assertEquals(invoice.products.product[1].length(), 5, "Product 2 field count mismatched");
test:assertEquals(invoice.products.product[1].id, 2);
test:assertEquals(invoice.products.product[1].name, "Product 2");
test:assertEquals(regexp:replaceAll(re `[\r\n]`, invoice.products.product[1].description, "\n"),
"This is the description for\n Product 2.\n ");
test:assertEquals(invoice.products.product[1].description, string `This is the description for
Product 2.
`);
test:assertEquals(invoice.products.product[0].price.length(), 2, "Price 1 price field count mismatched");
test:assertEquals(invoice.products.product[1].price.\#content, 6312.36d);
test:assertEquals(invoice.products.product[1].price.currency, "LKR");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
{
"resources":{
"includes":[ {
"pattern":"\\QMETA-INF/services/javax.xml.stream.XMLInputFactory\\E"
}, {
"pattern":"\\QMETA-INF/services/javax.xml.stream.XMLOutputFactory\\E"
}]},
"bundles":[{
"name":"error",
"locales":[""]
Expand Down

0 comments on commit 85ff30a

Please sign in to comment.