If students have a Jewish history test on Sunday, are they permitted to study for the test on Shabbos?
It is permissible to study a Torah subject on Shabbos even if you are studying in order to take a test during the week. The rationale is that you are acquiring the knowledge at the time you are studying, so the result is immediate. Only when the desired result of an action is delayed until after Shabbos is there concern about hachonoh. ((See Shemiras Shabbos Kehilchosoh 28:84 and notes 169, 206 and 207.))
It is not entirely clear whether this logic can always be applied to secular education. Studying secular material such as medical, mathematics or law textbooks can have a number of objectives. Sometimes the student is genuinely interested in learning and retaining the material. However, for some people, in certain circumstances, the material studied has no importance whatsoever. The only objective is to pass a test to further a career or degree.
Consequently, if a person wishes to study a secular subject on Shabbos, is interested in retaining the information, and views his study as enhancing his education, he is permitted to study that material on Shabbos since the benefit (the education) is immediate. If, however, the purpose of studying is only to pass the test, and he considers the information otherwise worthless, then the studying of that material might be viewed as preparation for the test. On the other hand, perhaps the acquisition of information can still be regarded as an immediate benefit, since it was acquired, even if the student does not value it.
Whenever one learns a Torah-related subject (e.g., halochoh, Tanach, Mishnoh, Gemoro, or Jewish history presented with the insight of Chazal or chachmei yisroel), halochoh recognizes an inherent benefit from the acquisition of such knowledge, whether the student recognizes it or not.