Commit e28e787
Fixed usemodule() reporting success when the module exited non-zero
usemodule() ignored the module's exit status and defined its class either way.
It returns false now when the module ran and failed, and only fails as a
function when the module could not be run or read at all. The distinction
matters: a failed function call leaves the class undefined rather than false,
so "not => usemodule(...)" would not have become true either.
The test could not pass or fail whatever the code did. It looked for the modules
one directory too high, its Pass guard asked for a class and its own negation,
and the module it runs exits 1 on purpose which failed the whole test bundle.
With those corrected it fails on the old code and passes on the new.
Ticket: CFE-942
Changelog: Title
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit a5b28ff)1 parent 8a337ed commit e28e787
2 files changed
Lines changed: 27 additions & 12 deletions
File tree
- libpromises
- tests/acceptance/02_classes/02_functions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
2574 | 2574 | | |
2575 | 2575 | | |
2576 | 2576 | | |
2577 | | - | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
2578 | 2581 | | |
2579 | 2582 | | |
2580 | 2583 | | |
2581 | 2584 | | |
2582 | | - | |
| 2585 | + | |
2583 | 2586 | | |
2584 | 2587 | | |
2585 | 2588 | | |
| |||
8843 | 8846 | | |
8844 | 8847 | | |
8845 | 8848 | | |
8846 | | - | |
| 8849 | + | |
8847 | 8850 | | |
8848 | 8851 | | |
8849 | 8852 | | |
| |||
8874 | 8877 | | |
8875 | 8878 | | |
8876 | 8879 | | |
8877 | | - | |
| 8880 | + | |
8878 | 8881 | | |
8879 | 8882 | | |
8880 | 8883 | | |
| |||
8884 | 8887 | | |
8885 | 8888 | | |
8886 | 8889 | | |
| 8890 | + | |
| 8891 | + | |
| 8892 | + | |
| 8893 | + | |
| 8894 | + | |
8887 | 8895 | | |
8888 | 8896 | | |
8889 | 8897 | | |
| |||
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 45 | + | |
| 46 | + | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | | - | |
| 55 | + | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
63 | | - | |
| 61 | + | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
| 66 | + | |
68 | 67 | | |
69 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
76 | | - | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
0 commit comments