Skip to content

Commit cecf66e

Browse files
committed
Add newer libstrophe versions
1 parent e8f0b3c commit cecf66e

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

.github/workflows/libstrophe.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- 0.10.1
1919
- 0.11.0
2020
- 0.12.3
21+
- 0.13.1
2122
runs-on: ubuntu-24.04
2223
env:
2324
LIBSTROPHE_VERSION: ${{ matrix.libstrophe-version }}

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ names = "0.14"
3333
trybuild = "1"
3434

3535
[features]
36-
default = ["rust-log", "libstrophe-0_12_0"]
36+
default = ["rust-log", "libstrophe-0_13"]
3737
buildtime_bindgen = ["sys/buildtime_bindgen"]
3838
libstrophe-0_9_3 = []
3939
libstrophe-0_10_0 = ["libstrophe-0_9_3"]
4040
libstrophe-0_11_0 = ["libstrophe-0_10_0"]
4141
libstrophe-0_12_0 = ["libstrophe-0_11_0"]
42+
libstrophe-0_13 = ["libstrophe-0_12_0"]
4243
rust-log = ["log"]

ci/script.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ if verlte "0.11.0" "$LIBSTROPHE_VERSION"; then
2525
cargo test -v $ARGS --release -- --test-threads=1
2626
fi
2727

28-
if verlte "0.12.0" "$LIBSTROPHE_VERSION"; then
28+
if verlte "0.12.1" "$LIBSTROPHE_VERSION"; then
29+
ARGS="--no-default-features --features=buildtime_bindgen,libstrophe-0_12_0"
30+
cargo test -v $ARGS -- --test-threads=1
31+
cargo test -v $ARGS --release -- --test-threads=1
32+
fi
33+
34+
if verlte "0.13.0" "$LIBSTROPHE_VERSION"; then
2935
cargo test -v -- --test-threads=1
3036
cargo test -v --release -- --test-threads=1
3137
cargo test -v --features=buildtime_bindgen -- --test-threads=1

src/tests/mod.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,11 @@ fn zero_sized_handlers() {
448448
.unwrap();
449449
ctx.run();
450450
}
451-
assert_eq!(i.load(Ordering::Relaxed), 1);
451+
if cfg!(feature = "libstrophe-0_13") {
452+
assert_eq!(i.load(Ordering::Relaxed), 0);
453+
} else {
454+
assert_eq!(i.load(Ordering::Relaxed), 1);
455+
}
452456

453457
// non zero sized handlers are called
454458
i.store(0, Ordering::Relaxed);
@@ -937,7 +941,11 @@ fn handler() {
937941
.expect("Can't add handler");
938942
let ctx = conn.connect_client(None, None, default_con_handler).unwrap();
939943
ctx.run();
940-
assert_eq!(i.load(Ordering::Relaxed), 1);
944+
if cfg!(feature = "libstrophe-0_13") {
945+
assert_eq!(i.load(Ordering::Relaxed), 0);
946+
} else {
947+
assert_eq!(i.load(Ordering::Relaxed), 1);
948+
}
941949
}
942950

943951
// handler call stanza name not existent

0 commit comments

Comments
 (0)