<commit_before>let s:save_cpo = &cpoptions
set cpoptions&vim

let s:runningTest = 0

function! OmniSharp#actions#test#Run(...) abort
  if !s:CheckCapabilities() | return | endif
  let bufnr = a:0 ? a:1 : bufnr('%')
  if !has_key(OmniSharp#GetHost(bufnr), 'project')
    " Initialize the test by fetching the project for the buffer - then call
    " this function again in the callback
    call OmniSharp#actions#project#Get(bufnr,
    \ function('OmniSharp#actions#test#Run', [bufnr]))
    return
  endif
  let s:runningTest = 1
  call OmniSharp#actions#codestructure#Get(bufnr,
  \ function('s:RunTest', [function('s:CBRunTest')]))
endfunction

function! s:CBRunTest(summary) abort
  if a:summary.pass
    if len(a:summary.locations) == 0
      echomsg 'No tests were run'
    else
      echohl Title
      echomsg a:summary.locations[0].name . ': passed'
      echohl None
    endif
  else
    echomsg a:summary.locations[0].name . ': failed'
    let title = 'Test failure: ' . a:summary.locations[0].name
    call OmniSharp#locations#SetQuickfix(a:summary.locations, title)
  endif
endfunction
<commit_msg>Report that single skipped test was skipped<commit_after>let s:save_cpo = &cpoptions
set cpoptions&vim

let s:runningTest = 0

function! OmniSharp#actions#test#Run(...) abort
  if !s:CheckCapabilities() | return | endif
  let bufnr = a:0 ? a:1 : bufnr('%')
  if !has_key(OmniSharp#GetHost(bufnr), 'project')
    " Initialize the test by fetching the project for the buffer - then call
    " this function again in the callback
    call OmniSharp#actions#project#Get(bufnr,
    \ function('OmniSharp#actions#test#Run', [bufnr]))
    return
  endif
  let s:runningTest = 1
  call OmniSharp#actions#codestructure#Get(bufnr,
  \ function('s:RunTest', [function('s:CBRunTest')]))
endfunction

function! s:CBRunTest(summary) abort
  if a:summary.pass
    if len(a:summary.locations) == 0
      echomsg 'No tests were run'
    elseif a:summary.locations[0].type ==# 'W'
      echohl WarningMsg
      echomsg a:summary.locations[0].name . ': skipped'
      echohl None
    else
      echohl Title
      echomsg a:summary.locations[0].name . ': passed'
      echohl None
    endif
  else
    echomsg a:summary.locations[0].name . ': failed'
    let title = 'Test failure: ' . a:summary.locations[0].name
    call OmniSharp#locations#SetQuickfix(a:summary.locations, title)
  endif
endfunction

{'fraction_non_alphanumeric': 0.11993313832010029, 'fraction_numerical': 0.007521938988717091, 'mean_word_length': 3.895705521472393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3292736', 'n_tokens_mistral': 861, 'n_tokens_neox': 799, 'n_words': 198}