mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Remove trailing newlines from Hello World examples
This commit is contained in:
parent
6ea8df5e16
commit
9f68194436
5 changed files with 9 additions and 9 deletions
|
@ -329,7 +329,7 @@ mod cli_run {
|
||||||
executable_filename: "hello_c",
|
executable_filename: "hello_c",
|
||||||
stdin: &[],
|
stdin: &[],
|
||||||
input_file: None,
|
input_file: None,
|
||||||
expected_ending:"Hello, World!\n",
|
expected_ending:"Hello, World!",
|
||||||
use_valgrind: true,
|
use_valgrind: true,
|
||||||
},
|
},
|
||||||
hello_zig:"hello-world" => Example {
|
hello_zig:"hello-world" => Example {
|
||||||
|
@ -337,7 +337,7 @@ mod cli_run {
|
||||||
executable_filename: "hello_zig",
|
executable_filename: "hello_zig",
|
||||||
stdin: &[],
|
stdin: &[],
|
||||||
input_file: None,
|
input_file: None,
|
||||||
expected_ending:"Hello, World!\n",
|
expected_ending:"Hello, World!",
|
||||||
use_valgrind: true,
|
use_valgrind: true,
|
||||||
},
|
},
|
||||||
hello_rust:"hello-world" => Example {
|
hello_rust:"hello-world" => Example {
|
||||||
|
@ -345,7 +345,7 @@ mod cli_run {
|
||||||
executable_filename: "hello_rust",
|
executable_filename: "hello_rust",
|
||||||
stdin: &[],
|
stdin: &[],
|
||||||
input_file: None,
|
input_file: None,
|
||||||
expected_ending:"Hello, World!\n",
|
expected_ending:"Hello, World!",
|
||||||
use_valgrind: true,
|
use_valgrind: true,
|
||||||
},
|
},
|
||||||
hello_swift:"hello-world" => Example {
|
hello_swift:"hello-world" => Example {
|
||||||
|
@ -353,7 +353,7 @@ mod cli_run {
|
||||||
executable_filename: "hello_swift",
|
executable_filename: "hello_swift",
|
||||||
stdin: &[],
|
stdin: &[],
|
||||||
input_file: None,
|
input_file: None,
|
||||||
expected_ending:"Hello Swift, meet Roc\n",
|
expected_ending:"Hello, World!",
|
||||||
use_valgrind: true,
|
use_valgrind: true,
|
||||||
},
|
},
|
||||||
hello_web:"hello-world" => Example {
|
hello_web:"hello-world" => Example {
|
||||||
|
@ -361,7 +361,7 @@ mod cli_run {
|
||||||
executable_filename: "hello_web",
|
executable_filename: "hello_web",
|
||||||
stdin: &[],
|
stdin: &[],
|
||||||
input_file: None,
|
input_file: None,
|
||||||
expected_ending:"Hello, World!\n",
|
expected_ending:"Hello, World!",
|
||||||
use_valgrind: true,
|
use_valgrind: true,
|
||||||
},
|
},
|
||||||
fib:"fib" => Example {
|
fib:"fib" => Example {
|
||||||
|
|
|
@ -3,4 +3,4 @@ app "hello_c"
|
||||||
imports []
|
imports []
|
||||||
provides [ main ] to pf
|
provides [ main ] to pf
|
||||||
|
|
||||||
main = "Hello, World!\n"
|
main = "Hello, World!"
|
||||||
|
|
|
@ -7,6 +7,6 @@ greeting =
|
||||||
hi = "Hello"
|
hi = "Hello"
|
||||||
name = "World"
|
name = "World"
|
||||||
|
|
||||||
"\(hi), \(name)!\n"
|
"\(hi), \(name)!"
|
||||||
|
|
||||||
main = greeting
|
main = greeting
|
||||||
|
|
|
@ -53,6 +53,6 @@ extension RocStr {
|
||||||
|
|
||||||
@_cdecl("main")
|
@_cdecl("main")
|
||||||
func main() -> UInt8 {
|
func main() -> UInt8 {
|
||||||
print(roc__mainForHost_1_exposed().string)
|
print(roc__mainForHost_1_exposed().string, terminator: "")
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ pub fn main() u8 {
|
||||||
std.os.clock_gettime(std.os.CLOCK_REALTIME, &ts2) catch unreachable;
|
std.os.clock_gettime(std.os.CLOCK_REALTIME, &ts2) catch unreachable;
|
||||||
|
|
||||||
// stdout the result
|
// stdout the result
|
||||||
stdout.print("{s}\n", .{callresult.asSlice()}) catch unreachable;
|
stdout.print("{s}", .{callresult.asSlice()}) catch unreachable;
|
||||||
|
|
||||||
callresult.deinit();
|
callresult.deinit();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue