query_windows_test.go 516 B

1234567891011121314151617181920212223242526272829303132
  1. //go:build windows
  2. package yu_phone
  3. import (
  4. "fmt"
  5. "strings"
  6. "testing"
  7. )
  8. func TestQuery(t *testing.T) {
  9. fmt.Println(Query("13564826141"))
  10. fmt.Println("17638584853"[5:])
  11. j_str := `
  12. `
  13. j_out := ""
  14. j_out2 := ""
  15. for _, j_item := range strings.Split(j_str, "\n") {
  16. j_items := strings.Split(j_item, "----")
  17. if len(j_items) == 3 {
  18. if Query(j_items[2]).Province == "河南" {
  19. j_out += j_item + "\r\n"
  20. } else {
  21. j_out2 += j_item + "\r\n"
  22. }
  23. }
  24. }
  25. fmt.Println(j_out + "\r\n\r\n" + j_out2)
  26. }