Fix broken build.

The fix for d8 readline() broke hello1 and hello2 tests.
This commit is contained in:
Alexander Gorshenev
2017-08-04 12:46:50 +03:00
committed by alexander-gorshenev
parent 51f74b4203
commit 21ad2d97e6
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -414,13 +414,13 @@ task hello0(type: RunKonanTest) {
}
task hello1(type: RunKonanTest) {
goldValue = "Hello World"
goldValue = "Hello World\n"
testData = "Hello World\n"
source = "runtime/basic/hello1.kt"
}
task hello2(type: RunKonanTest) {
goldValue = "you entered 'Hello World'"
goldValue = "you entered 'Hello World\n'"
testData = "Hello World\n"
source = "runtime/basic/hello2.kt"
}
+3 -1
View File
@@ -73,7 +73,9 @@ var konan_dependencies = {
},
// TODO: Account for file and size.
fgets: function(str, size, file) {
fromString(utf8encode(readline()), str);
// TODO: readline can't read lines without a newline.
// Browsers cant read from console at all.
fromString(utf8encode(readline() + '\n'), str);
return str;
},
Konan_heap_upper: function() {