<commit_before>" Tests for vesting.

scriptencoding utf-8

" Saving 'cpoptions' {{{
let s:save_cpo = &cpo
set cpo&vim
" }}}

Context Fopen.run()
  " let answer = input('Want to execute socket test? ')
  " if answer !~? 'y\%[es]'
  "   return
  " endif

  " let sock = vimproc#socket_open('www.yahoo.com', 80)
"   call sock.write("GET / HTTP/1.0\r\n\r\n", 100)
"   let res = ''
"   let out = sock.read(-1, 100)
"   while !sock.eof && out != ''
"     let out = sock.read(-1, 100)
"     let res .= out
"   endwhile
" 
"   It yet not closed
"     Should sock.is_valid
"   End
" 
"   call sock.close()
" 
"   It closed
"     Should !sock.is_valid
"   End
" 
"   echo res
End

Fin

" Restore 'cpoptions' {{{
let &cpo = s:save_cpo
" }}}

" vim:foldmethod=marker:fen:
<commit_msg>- Removed comment out.<commit_after>" Tests for vesting.

scriptencoding utf-8

" Saving 'cpoptions' {{{
let s:save_cpo = &cpo
set cpo&vim
" }}}

Context Fopen.run()
  let answer = input('Want to execute socket test? ')
  if answer !~? 'y\%[es]'
    return
  endif

  let sock = vimproc#socket_open('www.yahoo.com', 80)
  call sock.write("GET / HTTP/1.0\r\n\r\n", 100)
  let res = ''
  let out = sock.read(-1, 100)
  while !sock.eof && out != ''
    let out = sock.read(-1, 100)
    let res .= out
  endwhile

  It yet not closed
    Should sock.is_valid
  End

  call sock.close()

  It closed
    Should !sock.is_valid
  End

  echo res
End

Fin

" Restore 'cpoptions' {{{
let &cpo = s:save_cpo
" }}}

" vim:foldmethod=marker:fen:

{'fraction_non_alphanumeric': 0.16212624584717608, 'fraction_numerical': 0.0212624584717608, 'mean_word_length': 2.7839195979899496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5408593', 'n_tokens_mistral': 644, 'n_tokens_neox': 604, 'n_words': 155}