Skip to content

Commit 2e2aa5c

Browse files
committed
test(embedded): Migrate to new syntax
1 parent a7e2ccc commit 2e2aa5c

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

tests/testsuite/script.rs

+15-19
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,10 @@ error: running `echo.rs` requires `-Zscript`
208208
#[cargo_test]
209209
fn clean_output_with_edition() {
210210
let script = r#"#!/usr/bin/env cargo
211-
212-
//! ```cargo
213-
//! [package]
214-
//! edition = "2018"
215-
//! ```
211+
```cargo
212+
[package]
213+
edition = "2018"
214+
```
216215
217216
fn main() {
218217
println!("Hello world!");
@@ -240,10 +239,9 @@ fn main() {
240239
#[cargo_test]
241240
fn warning_without_edition() {
242241
let script = r#"#!/usr/bin/env cargo
243-
244-
//! ```cargo
245-
//! [package]
246-
//! ```
242+
```cargo
243+
[package]
244+
```
247245
248246
fn main() {
249247
println!("Hello world!");
@@ -625,11 +623,10 @@ fn missing_script_rs() {
625623
fn test_name_same_as_dependency() {
626624
Package::new("script", "1.0.0").publish();
627625
let script = r#"#!/usr/bin/env cargo
628-
629-
//! ```cargo
630-
//! [dependencies]
631-
//! script = "1.0.0"
632-
//! ```
626+
```cargo
627+
[dependencies]
628+
script = "1.0.0"
629+
```
633630
634631
fn main() {
635632
println!("Hello world!");
@@ -662,11 +659,10 @@ fn main() {
662659
#[cargo_test]
663660
fn test_path_dep() {
664661
let script = r#"#!/usr/bin/env cargo
665-
666-
//! ```cargo
667-
//! [dependencies]
668-
//! bar.path = "./bar"
669-
//! ```
662+
```cargo
663+
[dependencies]
664+
bar.path = "./bar"
665+
```
670666
671667
fn main() {
672668
println!("Hello world!");

0 commit comments

Comments
 (0)