Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

test(cli): validate AppImage paths across supported platforms

Richie McIlroy18f321ca7cd1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 80b82f712..84c1d82b1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -185,6 +185,10 @@ jobs:
shell: bash
run: node scripts/setup.js
+ - name: Test desktop installation and storage helpers
+ shell: bash
+ run: cargo test --locked -p cap-utils -p cap-cli-install --lib
+
- name: Build desktop binaries
shell: bash
run: ./scripts/build-desktop-binaries.sh ${{ matrix.settings.target }}
@@ -276,7 +280,6 @@ jobs:
run: |
node --test scripts/linux-bundle-config.test.mjs scripts/finalize-linux-appimage.test.mjs
pnpm --dir apps/desktop exec vitest run scripts/prepare.test.js
- cargo test --locked -p cap-utils -p cap-cli-install --lib
cargo test --locked -p cap --bin cap record::tests
cargo test --locked -p cap-recording --lib
cargo test --locked -p cap-enc-ffmpeg
diff --git a/crates/cli-install/src/appimage.rs b/crates/cli-install/src/appimage.rs
index 72b230825..8d86c3011 100644
--- a/crates/cli-install/src/appimage.rs
+++ b/crates/cli-install/src/appimage.rs
@@ -186,7 +186,11 @@ mod tests {
fn cli_launch_resolves_relative_paths_from_the_original_directory() {
let parent_directory = std::env::current_dir().unwrap();
let root = tempfile::tempdir().unwrap();
- for name in [b"caller's directory".as_slice(), b"caller-\xff".as_slice()] {
+ for name in [
+ b"caller's directory".as_slice(),
+ #[cfg(target_os = "linux")]
+ b"caller-\xff".as_slice(),
+ ] {
let directory = root.path().join(OsString::from_vec(name.to_vec()));
fs::create_dir(&directory).unwrap();
fs::write(directory.join("relative-project.txt"), b"caller project").unwrap();