builder: do not allow `v run _test.v`
							parent
							
								
									1fabb7d5a6
								
							
						
					
					
						commit
						be0e848ae8
					
				| 
						 | 
					@ -167,6 +167,10 @@ pub fn (v Builder) get_user_files() []string {
 | 
				
			||||||
		user_files << os.join_path(preludes_path, 'profiled_program.v')
 | 
							user_files << os.join_path(preludes_path, 'profiled_program.v')
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	is_test := dir.ends_with('_test.v')
 | 
						is_test := dir.ends_with('_test.v')
 | 
				
			||||||
 | 
						if v.pref.is_run {
 | 
				
			||||||
 | 
							println('use `v x_test.v` instead of `v run x_test.v`')
 | 
				
			||||||
 | 
							exit(1)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	mut is_internal_module_test := false
 | 
						mut is_internal_module_test := false
 | 
				
			||||||
	if is_test {
 | 
						if is_test {
 | 
				
			||||||
		tcontent := os.read_file(dir) or {
 | 
							tcontent := os.read_file(dir) or {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue