mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 16:02:45 +00:00
22 lines
721 B
TypeScript
22 lines
721 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
buildLegacyAppImageCliWrapper,
|
|
extractLegacyAppImageCliWrapperTarget
|
|
} from './legacy-appimage-cli-wrapper'
|
|
|
|
describe('legacy AppImage CLI wrapper', () => {
|
|
it('recovers a path containing a newline', () => {
|
|
const appImagePath = "/tmp/Orca\nnightly's.AppImage"
|
|
expect(extractLegacyAppImageCliWrapperTarget(buildLegacyAppImageCliWrapper(appImagePath))).toBe(
|
|
appImagePath
|
|
)
|
|
})
|
|
|
|
it('rejects a wrapper with a changed command body', () => {
|
|
const wrapper = buildLegacyAppImageCliWrapper('/tmp/Orca.AppImage')
|
|
expect(
|
|
extractLegacyAppImageCliWrapperTarget(wrapper.replace('set -euo pipefail', 'set -u'))
|
|
).toBe(null)
|
|
})
|
|
})
|