Skip to content

Commit

Permalink
Merge pull request #23 from kivikakk/failing-test
Browse files Browse the repository at this point in the history
Source build of libpcre faults on darwin-arm64.
  • Loading branch information
kivikakk authored Jul 1, 2024
2 parents 42409ae + 8a171dc commit 1dc3240
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/zig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
strategy:
matrix:
zig-version: ["0.12.0", "0.13.0"]
runs-on: ["ubuntu-latest", "macos-latest", "windows-latest"]
runs-on: ["ubuntu-latest", "macos-13", "macos-latest", "windows-latest"]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
- uses: goto-bus-stop/setup-zig@2a9625d550eefc3a9b1a43d342ad655f563f8241
with:
version: ${{ matrix.zig-version }}
- run: zig build
Expand Down
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
.version = "0.1.0",
.dependencies = .{
.pcre = .{
.url = "/~https://github.com/kivikakk/pcre-8.45/archive/812524706afd3a333c1fb31100e046f167740ac3.tar.gz",
.hash = "1220ac1f2dc0def06527baacecdacf3daae723bf0b439356ee5db6868ca255412b59",
.url = "/~https://github.com/kivikakk/pcre-8.45/archive/6a08aa250b3ca1deea5fbc5f696bb4e25ac2da90.tar.gz",
.hash = "1220d07bc993a0378d209d115c8937d32b625bb70d3ac9ef9975efb961670af389a3",
},
},
.minimum_zig_version = "0.12.0",
Expand Down
10 changes: 10 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,13 @@ test "missing capture group at end of capture list" {
null,
}, captures);
}

test "what" {
const regex = try Regex.compile("(?:ab|.)*", .{});
defer regex.deinit();

const line =
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ++
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
try testing.expect((try regex.matches(line, .{})) != null);
}

0 comments on commit 1dc3240

Please sign in to comment.