A. Yusuf Ali:Translation:
We did test those before them, and Allah will
certainly know 3424 those who are true from those
who are false.

Muhammad Asad:Translation:
Yea, indeed, We did test those who lived before them; and so, [too, shall be tested the people now living: and] most certainly will God mark out those who prove themselves true, and most certainly will He mark out those who are lying. 2
3424 The word "know" is used here more in the sense of testing than of acquiring knowledge. Allah is All-Knowing: He needs no test to increase His own knowledge, but the test is to burn out the dross within ourselves, as explained in the last note.