mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
test(embedded): Migrate to new syntax
This commit is contained in:
parent
ba869d36ed
commit
a365a69130
@ -208,11 +208,10 @@ error: running `echo.rs` requires `-Zscript`
|
||||
#[cargo_test]
|
||||
fn clean_output_with_edition() {
|
||||
let script = r#"#!/usr/bin/env cargo
|
||||
|
||||
//! ```cargo
|
||||
//! [package]
|
||||
//! edition = "2018"
|
||||
//! ```
|
||||
```cargo
|
||||
[package]
|
||||
edition = "2018"
|
||||
```
|
||||
|
||||
fn main() {
|
||||
println!("Hello world!");
|
||||
@ -240,10 +239,9 @@ fn main() {
|
||||
#[cargo_test]
|
||||
fn warning_without_edition() {
|
||||
let script = r#"#!/usr/bin/env cargo
|
||||
|
||||
//! ```cargo
|
||||
//! [package]
|
||||
//! ```
|
||||
```cargo
|
||||
[package]
|
||||
```
|
||||
|
||||
fn main() {
|
||||
println!("Hello world!");
|
||||
@ -625,11 +623,10 @@ fn missing_script_rs() {
|
||||
fn test_name_same_as_dependency() {
|
||||
Package::new("script", "1.0.0").publish();
|
||||
let script = r#"#!/usr/bin/env cargo
|
||||
|
||||
//! ```cargo
|
||||
//! [dependencies]
|
||||
//! script = "1.0.0"
|
||||
//! ```
|
||||
```cargo
|
||||
[dependencies]
|
||||
script = "1.0.0"
|
||||
```
|
||||
|
||||
fn main() {
|
||||
println!("Hello world!");
|
||||
@ -662,11 +659,10 @@ fn main() {
|
||||
#[cargo_test]
|
||||
fn test_path_dep() {
|
||||
let script = r#"#!/usr/bin/env cargo
|
||||
|
||||
//! ```cargo
|
||||
//! [dependencies]
|
||||
//! bar.path = "./bar"
|
||||
//! ```
|
||||
```cargo
|
||||
[dependencies]
|
||||
bar.path = "./bar"
|
||||
```
|
||||
|
||||
fn main() {
|
||||
println!("Hello world!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user