forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformat.rs
23 lines (21 loc) · 852 Bytes
/
format.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2021, Facebook, Inc. and its affiliates
// Copyright (c) 2022, Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#[test]
fn test_format() {
// If this test breaks and you intended a format change, you need to run to get the fresh format:
// # cargo -q run --example generate-format -- print > crates/sui-core/tests/staged/sui.yaml
let status = std::process::Command::new("cargo")
.current_dir("..")
.args(&["run", "--example", "generate-format", "--"])
.arg("test")
.status()
.expect("failed to execute process");
assert!(
status.success(),
"\n\
If this test breaks and you intended a format change, you need to run to get the fresh format:\n\
cargo -q run --example generate-format -- print > crates/sui-core/tests/staged/sui.yaml\n\
"
);
}