summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-12-05 23:45:43 +0000
committerDan Davison <dandavison7@gmail.com>2020-12-05 23:57:50 +0000
commit118ac4d906a69704feac098fa41594a2fd52d326 (patch)
treef97d1583734bf455186c887873cde67a5dc4762c
parent1e887f2daa35f961bf0d824151c6d9ecb2d7b422 (diff)
Debug windows failureadd-hyperlinks-tests
-rw-r--r--.github/workflows/ci.yml39
-rw-r--r--src/features/hyperlinks.rs21
-rw-r--r--src/tests/test_example_diffs.rs1
3 files changed, 21 insertions, 40 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e09da869..b3d1b44d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,13 +9,7 @@ jobs:
strategy:
matrix:
job:
- - { os: macos-latest, target: x86_64-apple-darwin, use-cross: false }
- { os: windows-latest, target: x86_64-pc-windows-msvc, use-cross: false }
- - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu, use-cross: false }
- - { os: ubuntu-latest, target: x86_64-unknown-linux-musl, use-cross: true }
- - { os: ubuntu-latest, target: i686-unknown-linux-gnu, use-cross: true }
- - { os: ubuntu-latest, target: arm-unknown-linux-gnueabihf, use-cross: true }
- - { os: ubuntu-latest, target: aarch64-unknown-linux-gnu, use-cross: true }
steps:
- name: Checkout repository
uses: actions/checkout@v2
@@ -33,39 +27,6 @@ jobs:
use-cross: ${{ matrix.job.use-cross }}
args: --target ${{ matrix.job.target }} --verbose -- --nocapture
- integration_tests:
- name: Integration tests
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [macos-latest, ubuntu-latest]
- include:
- - os: macos-latest
- target: x86_64-apple-darwin
- - os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
- - name: Build for release
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: --target ${{ matrix.target }} --release
- - name: End to end tests
- run: |
- DELTA_BIN=target/${{ matrix.target }}/release/delta
- ./tests/test_raw_output_matches_git_on_full_repo_history $DELTA_BIN
- ./tests/test_deprecated_options $DELTA_BIN > /dev/null
- - name: Run executable
- run: cargo run --release --target ${{ matrix.target }} -- < /dev/null
-
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
diff --git a/src/features/hyperlinks.rs b/src/features/hyperlinks.rs
index fb7c1677..46e0984d 100644
--- a/src/features/hyperlinks.rs
+++ b/src/features/hyperlinks.rs
@@ -124,6 +124,27 @@ mod tests {
"delta.__workdir__".to_string(),
GitConfigEntry::Path(PathBuf::from("/working/directory")),
);
+ println!(
+ "{}",
+ format!(
+ "\x1b]8;;file://{}\x1b\\link-text\x1b]8;;\x1b\\",
+ Path::new("/working/directory/relative/path/file.rs").to_string_lossy()
+ )
+ );
+ println!(
+ "{}",
+ format_osc8_file_hyperlink("relative/path/file.rs", None, "link-text", &config)
+ );
+ dbg!(format!(
+ "\x1b]8;;file://{}\x1b\\link-text\x1b]8;;\x1b\\",
+ Path::new("/working/directory/relative/path/file.rs").to_string_lossy()
+ ));
+ dbg!(format_osc8_file_hyperlink(
+ "relative/path/file.rs",
+ None,
+ "link-text",
+ &config
+ ));
assert_eq!(
format!(
"\x1b]8;;file://{}\x1b\\link-text\x1b]8;;\x1b\\",
diff --git a/src/tests/test_example_diffs.rs b/src/tests/test_example_diffs.rs
index 6668acce..7f7073af 100644
--- a/src/tests/test_example_diffs.rs
+++ b/src/tests/test_example_diffs.rs
@@ -62,7 +62,6 @@ mod tests {
let config = integration_test_utils::make_config_from_args(&[]);
let output = integration_test_utils::run_delta(RENAMED_FILE_WITH_CHANGES_INPUT, &config);
let output = strip_ansi_codes(&output);
- println!("{}", output);
assert!(test_utils::contains_once(
&output,
"\nrenamed: Casks/font-dejavusansmono-nerd-font.rb ⟶ Casks/font-dejavu-sans-mono-nerd-font.rb\n"));