Fix bin names in .crates.toml on win (#802)

`bins::BinFile::new` does not include `binary_ext` in the
`BinFile::base_name`.

Also add regression e2e-test.

Fixed #801

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-02-15 15:24:50 +11:00 committed by GitHub
parent 30f7722131
commit 9874dca454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View file

@ -4,7 +4,7 @@ use std::{
path::{self, Component, Path, PathBuf},
};
use compact_str::CompactString;
use compact_str::{format_compact, CompactString};
use normalize_path::NormalizePath;
use serde::Serialize;
use tinytemplate::TinyTemplate;
@ -141,7 +141,7 @@ impl BinFile {
};
Ok(Self {
base_name: CompactString::from(base_name),
base_name: format_compact!("{base_name}{binary_ext}"),
source,
dest,
link,