With 5.0, gnuplot has changed its way of working with dashed lines. By default, all string types are solid, and this is what the test command shows.
To include dashed lines, use the new dashtype keyword, e.g.
plot for [i=1:4] i*x dashtype i
This works for all terminals that support dashed lines.
Note that with dashtype you can also specify your own dashes.
Sample script:
set terminal lua tikz linewidth 3 standalone set output 'dash.tex' unset key set linetype 1 dashtype 2 set linetype 2 dashtype '..-' set linetype 3 dashtype (2,2,4,4,6,6) plot for [i=1:3] i*x

source share