diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2023-02-07 11:40:55 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2023-02-07 17:12:10 +0000 |
| commit | eb18293cec81d3e717f5287f305f7f3c596eb5d6 (patch) | |
| tree | 06755a0b5b7eac4270187d85e892db9bcef00c36 /src/bootstrap/setup | |
| parent | dffea43fc1102bdfe16d88ed412c23d4f0f08d9d (diff) | |
| download | rust-eb18293cec81d3e717f5287f305f7f3c596eb5d6.tar.gz rust-eb18293cec81d3e717f5287f305f7f3c596eb5d6.zip | |
Allow automatically creating vscode `settings.json` from bootstrap
Diffstat (limited to 'src/bootstrap/setup')
| -rw-r--r-- | src/bootstrap/setup/tests.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bootstrap/setup/tests.rs b/src/bootstrap/setup/tests.rs new file mode 100644 index 00000000000..dcf9d18e632 --- /dev/null +++ b/src/bootstrap/setup/tests.rs @@ -0,0 +1,14 @@ +use super::{SETTINGS_HASHES, VSCODE_SETTINGS}; +use sha2::Digest; + +#[test] +fn check_matching_settings_hash() { + let mut hasher = sha2::Sha256::new(); + hasher.update(&VSCODE_SETTINGS); + let hash = hex::encode(hasher.finalize().as_slice()); + assert_eq!( + &hash, + SETTINGS_HASHES.last().unwrap(), + "Update `SETTINGS_HASHES` with the new hash of `src/etc/vscode_settings.json`" + ); +} |
