From Fedora Project Wiki
No edit summary |
mNo edit summary |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{QA/Test_Case | {{QA/Test_Case | ||
|description=This test case tests whether | |description=This test case tests whether it compiles a program correctly. | ||
|setup= | |setup= | ||
# Ensure the {{package|rust}} package is installed | # Ensure the {{package|rust}} package is installed | ||
Line 6: | Line 6: | ||
# Open a text editor and type in a basic program (one is given for you to execute) | # Open a text editor and type in a basic program (one is given for you to execute) | ||
<pre> | |||
fn main() | fn main() | ||
{ | { | ||
println!("Hello, Rust is running on Fedora now!"); | println!("Hello, Rust is running on Fedora now!"); | ||
} | } | ||
</pre> | |||
# Save this in a file with name convention <filename>.rs | # Save this in a file with name convention <filename>.rs | ||
# Open terminal/konsole | # Open terminal/konsole | ||
# Compile the file by executing rustc <filename>.rs | # Compile the file by executing {{command|1=rustc <filename>.rs}} | ||
# Execute ./<filename> | # Execute {{command|1=./<filename>}} | ||
|results= | |results= | ||
# Hello, Rust is running on Fedora now! - will be displayed | # Hello, Rust is running on Fedora now! - will be displayed | ||
}} | }} | ||
[[Category:Package_rust_test_cases]] | [[Category:Package_rust_test_cases]] |
Latest revision as of 17:08, 21 July 2020
Description
This test case tests whether it compiles a program correctly.
Setup
- Ensure the
rust
package is installed
How to test
- Open a text editor and type in a basic program (one is given for you to execute)
fn main() { println!("Hello, Rust is running on Fedora now!"); }
- Save this in a file with name convention <filename>.rs
- Open terminal/konsole
- Compile the file by executing
rustc <filename>.rs
- Execute
./<filename>
Expected Results
- Hello, Rust is running on Fedora now! - will be displayed