From 2b1773375ad5b0b6d5a32d8a56a33ee14025afd9 Mon Sep 17 00:00:00 2001 From: cinco euzebio Date: Sun, 1 Mar 2026 03:43:10 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20add=20test=20for=20asset?= =?UTF-8?q?=20name=20format=20and=20bump=20to=200.5.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a unit test that asserts detect_arch returns names prefixed with 'tmuxido-' and suffixed with '-linux', matching what CI uploads. --- CHANGELOG.md | 5 +++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/self_update.rs | 13 +++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ec2129..70c2446 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [0.5.2] - 2026-03-01 + +### Added +- Test for `detect_arch` asserting asset name follows `tmuxido-{arch}-linux` format + ## [0.5.1] - 2026-03-01 ### Fixed diff --git a/Cargo.lock b/Cargo.lock index fb8ca1a..ea73ee6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -864,7 +864,7 @@ dependencies = [ [[package]] name = "tmuxido" -version = "0.5.1" +version = "0.5.2" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 34b1d7f..5f070e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tmuxido" -version = "0.5.1" +version = "0.5.2" edition = "2024" [dev-dependencies] diff --git a/src/self_update.rs b/src/self_update.rs index 21156af..3f5b4b4 100644 --- a/src/self_update.rs +++ b/src/self_update.rs @@ -198,6 +198,19 @@ mod tests { assert!(version.contains('.')); } + #[test] + fn should_prefix_arch_asset_with_tmuxido() { + let arch = detect_arch().expect("should detect supported arch"); + assert!( + arch.starts_with("tmuxido-"), + "asset name must start with 'tmuxido-', got: {arch}" + ); + assert!( + arch.ends_with("-linux"), + "asset name must end with '-linux', got: {arch}" + ); + } + #[test] fn should_compare_versions_correctly() { assert_eq!(