From 63ed0e467811e1858bdb1294e66560616686e2c8 Mon Sep 17 00:00:00 2001 From: Kristijan Husak Date: Mon, 8 Jan 2024 14:54:52 +0100 Subject: [PATCH] ci: Fix nightly tests --- .github/workflows/tests.yml | 2 ++ tests/minimal_init.lua | 20 ++++++++++++++++++++ tests/plenary/capture/templates_spec.lua | 3 +++ 3 files changed, 25 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aaed0f6b2..14eb773d6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -33,6 +33,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install xclip + run: sudo apt-get install xclip - name: Install Neovim uses: rhysd/action-setup-vim@v1 id: neovim diff --git a/tests/minimal_init.lua b/tests/minimal_init.lua index 3b8726f0b..47f6a6afe 100644 --- a/tests/minimal_init.lua +++ b/tests/minimal_init.lua @@ -100,6 +100,21 @@ vim.cmd.language('en_US.utf-8') vim.env.TZ = 'Europe/London' vim.g.mapleader = ',' +-- local clipboard = vim.fn['provider#clipboard#Executable']() +-- if clipboard == '' then +-- vim.g.clipboard = { +-- name = 'xclip', +-- copy = { +-- ['+'] = { 'xclip', '-quiet', '-i', '-selection', 'clipboard' }, +-- ['*'] = { 'xclip', '-quiet', '-i', '-selection', 'primary' }, +-- }, +-- paste = { +-- ['+'] = { 'xclip', '-o', '-selection', 'clipboard' }, +-- ['*'] = { 'xclip', '-o', '-selection', 'primary' }, +-- }, +-- } +-- end + require('orgmode').setup_ts_grammar() require('nvim-treesitter.configs').setup({ ensure_installed = { 'org' }, @@ -110,3 +125,8 @@ require('orgmode').setup({ org_agenda_files = { base_root_path .. '/plenary/fixtures/*' }, org_default_notes_file = base_root_path .. '/plenary/fixtures/refile.org', }) + +print('loading minimal init') +print('loading minimal init') +print('loading minimal init') +print('loading minimal init') diff --git a/tests/plenary/capture/templates_spec.lua b/tests/plenary/capture/templates_spec.lua index 5a9be3e5d..112bee52a 100644 --- a/tests/plenary/capture/templates_spec.lua +++ b/tests/plenary/capture/templates_spec.lua @@ -3,6 +3,9 @@ local Templates = require('orgmode.capture.templates') describe('Capture template', function() local templates = Templates:new() it('should compile expression', function() + vim.print(vim.fn['provider#clipboard#Executable']()) + vim.print(vim.fn['provider#clipboard#Executable']()) + vim.print(vim.fn['provider#clipboard#Executable']()) ---Backup and restore the clipboard local clip_backup = vim.fn.getreg('+') vim.fn.setreg('+', 'test')