Skip to content

Commit

Permalink
Fix cache-time.t tests
Browse files Browse the repository at this point in the history
  • Loading branch information
3Rafal committed Nov 7, 2023
1 parent bf59126 commit 893f948
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/test-dirs/cache-time.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@
> EOF

Let's populate file cache
$ $MERLIN server errors -log-file merlin_logs \
$ $MERLIN server errors -log-file merlin_logs -cache-time 45 \
> -filename main.ml 1> /dev/null <main.ml

When cache time is set to large value, we use the cache
When cache time is set to large value, we keep the cache
$ $MERLIN server errors -log-file merlin_logs -cache-time 45 \
> -filename main.ml 1> /dev/null <main.ml
$ cat merlin_logs | grep 'reusing 1 items, 0 new items to type'
reusing 1 items, 0 new items to type
$ cat merlin_logs | grep -A1 "# 0.01 File_cache(Cmi_cache) - flush" \
> | tail -1 | awk '{print $1;}'
keeping


When cache time is set to 0, file cache gets flushed
$ $MERLIN server errors -log-file merlin_logs -cache-time 0 \
> -filename main.ml 1> /dev/null <main.ml
$ cat merlin_logs | grep 'reusing 1 items, 0 new items to type'
[1]
$ cat merlin_logs | grep -A1 "# 0.01 File_cache(Cmi_cache) - flush" \
> | tail -1 | awk '{print $1;}'
removing

Stop server
$ $MERLIN server stop-server

0 comments on commit 893f948

Please sign in to comment.