Nuclear-spin-dependent parity violation (NSD-PV) effects in atoms and molecules arise from Z(0) boson exchange between electrons and the nucleus and from the magnetic interaction between electrons and the parity-violating nuclear anapole moment. It has been proposed to study NSD-PV effects using an enhancement of the observable effect in diatomic molecules [D. DeMille et al., Phys. Rev. Lett. 100, 023003 (2008)]. Here we demonstrate highly sensitive measurements of this type, using the test system (BaF)-Ba-138-F-19. We show that systematic errors associated with our technique can be suppressed to at least the level of the present statistical sensitivity. With similar to 170 h of data, we measure the matrix element W of the NSD-PV interaction with uncertainty delta W/(27 pi) < 0.7 Hz for each of two configurations where W must have different signs. This sensitivity would be sufficient to measure NSD-PV effects of the size anticipated across a wide range of nuclei.