cargo-telar 0.2.1

Cargo subcommand for Telar apps: dev server with hot reload, and packaging into native installers.
use super::*;

#[test]
fn nsis_script_installs_and_uninstalls_the_renamed_exe() {
    let script = nsis_script(
        "demo",
        Path::new("C:\\repo\\target\\release\\demo.exe"),
        Path::new("C:\\repo\\target\\telar-dist\\demo_1.0_setup.exe"),
    );
    assert!(
        script.contains("OutFile \"C:\\repo\\target\\telar-dist\\demo_1.0_setup.exe\""),
        "{script}"
    );
    assert!(
        script.contains("File \"/oname=demo.exe\" \"C:\\repo\\target\\release\\demo.exe\""),
        "the installer must place the renamed exe:\n{script}"
    );
    assert!(
        script.contains("InstallDir \"$PROGRAMFILES64\\demo\""),
        "{script}"
    );
    assert!(
        script.contains("Delete \"$INSTDIR\\demo.exe\""),
        "the uninstaller must remove the same name it installed:\n{script}"
    );
}