<commit_before>discard """
  output: '''string 1
string 2
string 3'''
"""
# bug #5532
import os, asyncfile, asyncdispatch

removeFile("test.txt")
let f = openAsync("test.txt", fmWrite)
var futs = newSeq[Future[void]]()
for i in 1..3:
  futs.add(f.write("string " & $i & "\n"))
waitFor(all(futs))
f.close()
echo readFile("test.txt")

<commit_msg>make async test more reliable<commit_after>discard """
  output: '''string 1
string 2
string 3'''
"""
# bug #5532
import os, asyncfile, asyncdispatch

const F = "test_async.txt"

removeFile(F)
let f = openAsync(F, fmWrite)
var futs = newSeq[Future[void]]()
for i in 1..3:
  futs.add(f.write("string " & $i & "\n"))
waitFor(all(futs))
f.close()
echo readFile(F)


{'fraction_non_alphanumeric': 0.18528995756718528, 'fraction_numerical': 0.02545968882602546, 'mean_word_length': 4.9, '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': '4716403', 'n_tokens_mistral': 287, 'n_tokens_neox': 279, 'n_words': 73}